path:
/default.nix
664 B | plain
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
{
pkgs ? import <nixpkgs> {}
, src ? ./.
}:
with pkgs;
stdenv.mkDerivation {
pname = "oeffisearch";
version = "0.1.0";
inherit src;
nativeBuildInputs = [ nim ];
buildInputs = [ openssl ];
buildPhase = ''
runHook preBuild
nim c -d:release --nimcache:$PWD src/oeffisearch.nim
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 src/oeffisearch $out/bin/oeffisearch
mkdir -p $out/share
cp -r client $out/share/client
runHook postInstall
'';
fixupPhase = ''
runHook preFixup
patchelf --set-rpath ${lib.makeLibraryPath [ openssl ]} $out/bin/oeffisearch
runHook postFixup
'';
}