-
Notifications
You must be signed in to change notification settings - Fork 0
/
oldshell.nix
46 lines (43 loc) · 1.09 KB
/
oldshell.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
with import <nixpkgs> {};
let zstd14 = stdenv.mkDerivation rec {
pname = "zstd";
version = "1.4.9";
src = fetchFromGitHub {
owner = "facebook";
repo = "zstd";
rev = "v${version}";
sha256 = "0icc0x89c35rq5bxd4d241vqxnz2i1qj2wwy01xls63p0z93brj7";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = lib.attrsets.mapAttrsToList
(name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") {
BUILD_SHARED = true;
BUILD_STATIC = true;
BUILD_CONTRIB = true;
PROGRAMS_LINK_SHARED = false;
LEGACY_SUPPORT = false;
BUILD_TESTS = false;
};
cmakeDir = "../build/cmake";
dontUseCmakeBuildDir = true;
preConfigure = ''
mkdir -p build_ && cd $_
'';
};
in
stdenv.mkDerivation {
name = "Pijul";
buildInputs = with pkgs; [
zstd14
libsodium
openssl
pkgconfig
libiconv
xxHash
] ++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [
CoreServices
Security
SystemConfiguration
]);
}