Skip to content

Commit

Permalink
refactor(nix): use functions instead of package references
Browse files Browse the repository at this point in the history
  • Loading branch information
uulm-janbaudisch committed Aug 15, 2024
1 parent 5b0016f commit ab3fe3e
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
(mt-kahypar pkgs)
(tbb pkgs)
pkgs.hwloc.lib
pkgs.boost
pkgs.gmp
] ++ lib.optionals pkgs.stdenv.cc.isClang [ pkgs.libcxx ];
};
Expand All @@ -58,17 +57,12 @@
# The binary with all dependencies.
bundled =
pkgs:
let
system =
if pkgs.stdenv.hostPlatform.isWindows then pkgs.stdenv.buildPlatform.system else pkgs.stdenv.system;
withSuffix = name: if pkgs.stdenv.hostPlatform.isWindows then "${name}-windows" else name;
in
pkgs.buildEnv {
name = "d4";
paths = [
self.packages.${system}.${withSuffix "d4"}
self.packages.${system}.${withSuffix "dependencies"}
self.packages.${system}.${withSuffix "documentation"}
(d4 pkgs)
(dependencies pkgs)
(documentation pkgs)
];
};
in
Expand Down Expand Up @@ -102,9 +96,6 @@
};
};

documentation = documentation pkgs;
documentation-windows = documentation pkgs-windows;

dependencies = dependencies pkgs;
dependencies-windows = dependencies pkgs-windows;

Expand Down

0 comments on commit ab3fe3e

Please sign in to comment.