-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
55 lines (55 loc) · 1.92 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
description = "A small utilities for SAT solver benchmark";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs =
{ self, nixpkgs }:
{
packages = builtins.listToAttrs (
map
(
system: with import nixpkgs { system = "${system}"; }; {
name = system;
value = {
default = rustPlatform.buildRustPackage rec {
name = "sat-bench-${version}";
pname = "sat-bench";
version = "0.16.1-20240926-1";
src = fetchFromGitHub {
name = "SAT-bench";
owner = "shnarazk";
repo = "SAT-bench";
rev = "0388ee0b5ec5ddca46eca36c063457d342adad6b";
hash = "sha256-ldmHS9LZ+iRy06QV1JtcUb50SusjdyXTpbS7Aj21Jto=";
};
cargoHash = "sha256-05Pv4mRtd7bBgxPjr0pz3wmxnBGh8mpAmqFScaQyS9A=";
buildInputs = rustc.buildInputs ++ [
cargo
rustc
libiconv
openssl
pkg-config
];
buildPhase = "cargo build --release";
installPhase = ''
mkdir -p $out/bin;
install -t $out/bin target/release/sat-bench target/release/benchm
mkdir -p $out/lib
cp -r 3-SAT SAT09 SatRace2015 SC21 $out/lib/
'';
patchPhase = ''
sed -i "s|long = \"lib\", default_value = \"\"|long = \"lib\", default_value = \"$out/lib\"|" src/bin/sat-bench.rs
'';
SATBENCHLIB = "$out/lib";
};
};
}
)
[
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
]
);
};
}