-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.nix
32 lines (25 loc) · 841 Bytes
/
default.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
{ pkgs, stdenv, lib, fetchFromGitHub, }:
stdenv.mkDerivation rec {
pname = "annepro2-tools";
version = "aa84bd1d34c961ada8c812dfea524592f7d2be2c";
src = fetchFromGitHub {
owner = "OpenAnnePro";
repo = "AnnePro2-Tools";
rev = version;
hash = "sha256-Bwzxhh4HUDOB+yvtQa0tdPgtVzgdQnrQKeHzObP5ctA=";
};
buildInputs = [ pkgs.cacert pkgs.libusb1 pkgs.cargo pkgs.rustc pkgs.pkgconfig ];
installPhase = ''
# Create the standard environment.
source $stdenv/setup
cp -r $src/* ./
cargo build --release
# Create place to store the binaries.
mkdir -p $out/bin
# Copy the binary to the output binary directory.
cp ./target/release/annepro2_tools $out/bin/annepro2-tools
# Allow execution of the binary.
chmod +x $out/bin/annepro2-tools
'';
system = builtins.currentSystem;
}