Skip to content

Commit

Permalink
feat(nix): update to 24.05
Browse files Browse the repository at this point in the history
  • Loading branch information
uulm-janbaudisch committed May 31, 2024
1 parent c5605a5 commit dc21aa5
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 39 deletions.
8 changes: 4 additions & 4 deletions flake.lock

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

89 changes: 54 additions & 35 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,31 @@
description = "Packages and development environments for d4";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils/v1.0.0";
};

outputs = { self, nixpkgs, flake-utils, ... }:
outputs =
{
self,
nixpkgs,
flake-utils,
...
}:
let
lib = nixpkgs.lib;
systems = lib.systems.doubles.unix;
in flake-utils.lib.eachSystem systems (system:
in
flake-utils.lib.eachSystem systems (
system:
let
pkgs = import nixpkgs { inherit system; };

tbb = if pkgs.stdenv.isDarwin
&& lib.versionOlder pkgs.stdenv.hostPlatform.darwinMinVersion
"10.13" then
pkgs.tbb
else
pkgs.tbb_2021_8;
/* tbb =
if pkgs.stdenv.isDarwin && lib.versionOlder pkgs.stdenv.hostPlatform.darwinMinVersion "10.13" then
pkgs.tbb
else
pkgs.tbb_2021_11;*/

meta = with lib; {
mainProgram = "d4";
Expand All @@ -28,16 +35,17 @@
license = licenses.lgpl21Plus;
platforms = systems;
};

in {
formatter = pkgs.nixfmt;
in
{
formatter = pkgs.nixfmt-rfc-style;

packages = {
default = self.packages.${system}.d4;

d4 = pkgs.stdenv.mkDerivation {
pname = "d4";
version = "2.0";
inherit meta;

src = ./.;

Expand All @@ -47,9 +55,10 @@
pkgs.gmp.dev
];

nativeBuildInputs = [ pkgs.cmake pkgs.ninja ];

inherit meta;
nativeBuildInputs = [
pkgs.cmake
pkgs.ninja
];
};

container = pkgs.dockerTools.buildLayeredImage {
Expand All @@ -58,10 +67,8 @@
config = {
Entrypoint = [ "/bin/d4" ];
Labels = {
"org.opencontainers.image.source" =
"https://github.com/SoftVarE-Group/d4v2";
"org.opencontainers.image.description" =
"A CNF to d-DNNF compiler";
"org.opencontainers.image.source" = "https://github.com/SoftVarE-Group/d4v2";
"org.opencontainers.image.description" = "A CNF to d-DNNF compiler";
"org.opencontainers.image.licenses" = "LGPL-2.1-or-later";
};
};
Expand All @@ -78,11 +85,22 @@
fetchSubmodules = true;
};

outputs = [ "out" "dev" ];
outputs = [
"out"
"dev"
];

buildInputs = [ pkgs.boost.dev pkgs.git pkgs.hwloc.dev tbb.dev ];
buildInputs = [
pkgs.boost.dev
pkgs.git
pkgs.hwloc.dev
pkgs.tbb.dev
];

nativeBuildInputs = [ pkgs.cmake pkgs.ninja ];
nativeBuildInputs = [
pkgs.cmake
pkgs.ninja
];

patches = [ ./mt-kahypar-pc.patch ];

Expand All @@ -97,8 +115,7 @@
installPhase = "cmake --install .";

meta = with lib; {
description =
"A shared-memory multilevel graph and hypergraph partitioner";
description = "A shared-memory multilevel graph and hypergraph partitioner";
longDescription = ''
Mt-KaHyPar (Multi-Threaded Karlsruhe Hypergraph Partitioner) is a shared-memory multilevel graph and hypergraph partitioner equipped with parallel implementations of techniques used in the best sequential partitioning algorithms.
Mt-KaHyPar can partition extremely large hypergraphs very fast and with high quality.
Expand All @@ -111,16 +128,17 @@

dependencies = pkgs.buildEnv {
name = "dependencies";
paths = [
self.packages.${system}.mt-kahypar
pkgs.hwloc.lib
pkgs.boost
pkgs.gmp
tbb
] ++ lib.optionals pkgs.stdenv.cc.isClang [
pkgs.libcxx
pkgs.libcxxabi
];
paths =
[
self.packages.${system}.mt-kahypar
pkgs.hwloc.lib
pkgs.boost
pkgs.gmp
pkgs.tbb
]
++ lib.optionals pkgs.stdenv.cc.isClang [
pkgs.libcxx
];
};

documentation = pkgs.stdenv.mkDerivation {
Expand All @@ -142,5 +160,6 @@
];
};
};
});
}
);
}

0 comments on commit dc21aa5

Please sign in to comment.