-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdefault.nix
More file actions
42 lines (33 loc) · 789 Bytes
/
default.nix
File metadata and controls
42 lines (33 loc) · 789 Bytes
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
{ pkgs ? import ./nixpkgs.nix {}, shell ? false }:
with pkgs;
let
inherit (rust.packages.stable) rustPlatform;
inherit (darwin.apple_sdk.frameworks) Security;
stdenv = pkgs.gcc11Stdenv;
in
{
ezpwd-reed-solomon = stdenv.mkDerivation rec {
name = "ezpwd-reed-solomon";
src = gitignoreSource ./.;
cargoSha256 = "0xz29dxvg306kfc6fmysccdlw8fldwdpv9i40dwxnmd0wzcwhxxx";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [
xcbuild
];
buildInputs = [
git
perl
bash
boost
ncurses
];
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/include
cp -RL c++/* $out/include
mkdir -p $out/lib
mv libezpwd-* $out/lib
'';
};
}