blobsets/default.nix

33 lines
651 B
Nix

with import <nixpkgs> { };
stdenv.mkDerivation {
name = "blobsets-0";
src = ./.;
cbor = fetchFromGitHub {
owner = "ehmry";
repo = "nim-cbor";
rev = "v0.5.2";
sha256 = "0fh8vriad6nvjl3fxl2b62bk7y4z1hx90527a530nln5g1cj9z8f";
};
siphash = fetchFromGitHub {
owner = "ehmry";
repo = "nim-siphash";
rev = "v0.1.0";
sha256 = "1z4xm3ckygw8pmn9b6axdk65ib1y5bgwa3v1dbxamvhjmyfr62w4";
};
buildInputs = [ nim pcre ];
NIX_LDFLAGS = [ "-lpcre" ];
buildPhase = ''
HOME=$TMPDIR
nim c -p:$cbor/src -p:$siphash/src -d:release src/blobset.nim
'';
installPhase = "install -Dt $out/bin src/blobset";
}