nixpkgs/pkgs/x/default.nix

65 lines
1.4 KiB
Nix
Raw Permalink Normal View History

2020-02-01 17:27:19 +00:00
{ pkgs ? import <nixpkgs> { } }:
let
version = "1.2.3";
out = pkgs.buildGoModule {
pname = "x";
version = version;
src = pkgs.fetchFromGitHub {
owner = "Xe";
repo = "x";
rev = "v${version}";
hash = "sha256-iw9WtpuSMl2NeNlcdg2JV618YVoU3UPa/0ED+r5Sj90=";
};
modSha256 = "sha256-mTzZcEoag1/1IAZCSY7MLgNS+lI453GM8SM1aFVLKUU=";
2020-03-15 13:24:55 +00:00
CGO_ENABLED = "0";
2020-02-01 17:27:19 +00:00
2020-02-10 21:39:06 +00:00
allowGoReference = true;
2020-02-01 17:27:19 +00:00
subPackages = [
2020-03-15 13:24:55 +00:00
"cmd/appsluggr"
2020-03-17 11:57:28 +00:00
"cmd/dnsd"
2020-03-15 13:24:55 +00:00
"cmd/johaus"
"cmd/license"
"cmd/mainsanow"
"cmd/prefix"
"cmd/quickserv"
2020-02-01 17:27:19 +00:00
];
2020-02-05 04:07:19 +00:00
outputs = [
"out" # keep the default output but don't use it
"appsluggr"
2020-03-17 11:57:28 +00:00
"dnsd"
2020-02-05 04:07:19 +00:00
"johaus"
"license"
"mainsanow"
"prefix"
2020-02-08 21:45:11 +00:00
"quickserv"
2020-02-05 04:07:19 +00:00
];
installPhase = ''
dir=$GOPATH/bin
install -D $dir/appsluggr $appsluggr/bin/appsluggr
2020-03-17 11:57:28 +00:00
install -D $dir/dnsd $dnsd/bin/dnsd
2020-02-05 04:07:19 +00:00
install -D $dir/johaus $johaus/bin/johaus
install -D $dir/license $license/bin/license
install -D $dir/mainsanow $mainsanow/bin/mainsanow
install -D $dir/prefix $prefix/bin/prefix
2020-02-08 21:45:11 +00:00
install -D $dir/quickserv $quickserv/bin/prefix
2020-02-05 04:07:19 +00:00
# let nix know that everything was fine
touch $out
'';
2020-02-01 17:27:19 +00:00
};
2020-03-15 13:24:55 +00:00
in {
2020-02-05 04:07:19 +00:00
appsluggr = out.appsluggr;
2020-03-17 11:57:28 +00:00
dnsd = out.dnsd;
2020-02-08 21:53:22 +00:00
quickserv = out.quickserv;
2020-02-05 04:07:19 +00:00
johaus = out.johaus;
license = out.license;
mainsanow = out.mainsanow;
prefix = out.prefix;
}