Skip to content

Commit

Permalink
fix Nix code and flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
markuskowa committed Apr 9, 2024
1 parent 04e6382 commit 80dabd9
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 30 deletions.
31 changes: 1 addition & 30 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,4 @@ let
version = "dev";
pkgs = import <nixpkgs> {};

in with pkgs; stdenv.mkDerivation {
pname = "qdng";
inherit version;

src = builtins.filterSource (path: type: path != ".git" && path != "result" && path != "build") ./.;

configureFlags = [
"--enable-openmp"
"--with-blas=-lblas"
"--with-lapack=-llapack"
"--disable-gccopt"
];

enableParallelBuilding = true;

preConfigure = ''
./genbs
'';

buildInputs = [ fftw protobuf blas lapack
bzip2 zlib libxml2 flex bison ];
nativeBuildInputs = [ automake autoconf libtool gfortran ];

meta = with lib; {
description = "Quantum dynamics program package";
platforms = platforms.linux;
maintainer = [ maintainers.markuskowa ];
license = licenses.unfree;
};
}
in pkgs.callPackage ./package.nix { protobuf = pkgs.protobuf3_21; }
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
description = "Quantum dynamics program package";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
};

outputs = { self, nixpkgs }: {

packages.x86_64-linux = let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
inherit (pkgs) lib callPackage;
in {
qdng = callPackage ./package.nix { protobuf = pkgs.protobuf3_21; };
default = self.packages.x86_64-linux.qdng;
};
};
}
36 changes: 36 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ lib, stdenv, fetchurl, requireFile, gfortran, fftw, protobuf
, blas, lapack
, automake, autoconf, libtool, zlib, bzip2, libxml2, flex, bison
} :

stdenv.mkDerivation rec {
pname = "qdng";
version = "1.0.0";

src = builtins.filterSource (path: type: path != ".git" && path != "result" && path != "build") ./.;

configureFlags = [
"--enable-openmp"
"--with-blas=-lblas"
"--with-lapack=-llapack"
"--disable-gccopt"
];

enableParallelBuilding = true;

preConfigure = ''
./genbs
'';

buildInputs = [ fftw protobuf blas lapack
bzip2 zlib libxml2 flex bison ];
nativeBuildInputs = [ automake autoconf libtool gfortran ];

meta = with lib; {
description = "Quantum dynamics program package";
platforms = platforms.linux;
maintainer = [ maintainers.markuskowa ];
license = licenses.gpl3Only;
};
}

0 comments on commit 80dabd9

Please sign in to comment.