mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
ripser: remove 'with lib;'
This commit is contained in:
parent
47891a407b
commit
4cd79d95b5
@ -5,14 +5,11 @@
|
||||
, fileFormat ? "lowerTriangularCsv"
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
assert assertOneOf "fileFormat" fileFormat
|
||||
assert lib.assertOneOf "fileFormat" fileFormat
|
||||
["lowerTriangularCsv" "upperTriangularCsv" "dipha"];
|
||||
assert useGoogleHashmap -> sparsehash != null;
|
||||
|
||||
let
|
||||
inherit (lib) optional;
|
||||
version = "1.2.1";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
@ -26,19 +23,19 @@ stdenv.mkDerivation {
|
||||
sha256 = "sha256-BxmkPQ/nl5cF+xwQMTjXnLgkLgdmT/39y7Kzl2wDfpE=";
|
||||
};
|
||||
|
||||
buildInputs = optional useGoogleHashmap sparsehash;
|
||||
buildInputs = lib.optional useGoogleHashmap sparsehash;
|
||||
|
||||
buildFlags = [
|
||||
"-std=c++11"
|
||||
"-O3"
|
||||
"-D NDEBUG"
|
||||
]
|
||||
++ optional useCoefficients "-D USE_COEFFICIENTS"
|
||||
++ optional indicateProgress "-D INDICATE_PROGRESS"
|
||||
++ optional useGoogleHashmap "-D USE_GOOGLE_HASHMAP"
|
||||
++ optional (fileFormat == "lowerTriangularCsv") "-D FILE_FORMAT_LOWER_TRIANGULAR_CSV"
|
||||
++ optional (fileFormat == "upperTriangularCsv") "-D FILE_FORMAT_UPPER_TRIANGULAR_CSV"
|
||||
++ optional (fileFormat == "dipha") "-D FILE_FORMAT_DIPHA"
|
||||
++ lib.optional useCoefficients "-D USE_COEFFICIENTS"
|
||||
++ lib.optional indicateProgress "-D INDICATE_PROGRESS"
|
||||
++ lib.optional useGoogleHashmap "-D USE_GOOGLE_HASHMAP"
|
||||
++ lib.optional (fileFormat == "lowerTriangularCsv") "-D FILE_FORMAT_LOWER_TRIANGULAR_CSV"
|
||||
++ lib.optional (fileFormat == "upperTriangularCsv") "-D FILE_FORMAT_UPPER_TRIANGULAR_CSV"
|
||||
++ lib.optional (fileFormat == "dipha") "-D FILE_FORMAT_DIPHA"
|
||||
;
|
||||
|
||||
buildPhase = "c++ ripser.cpp -o ripser $buildFlags";
|
||||
|
Loading…
Reference in New Issue
Block a user