nixpkgs/pkgs/x/default.nix

62 lines
1.4 KiB
Nix
Raw 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=";
CGO_ENABLED = "0";
# TODO: remove references to go in the non-default output
allowGoReference = true;
subPackages = [
"cmd/appsluggr"
"cmd/johaus"
"cmd/license"
"cmd/mainsanow"
"cmd/prefix"
"cmd/quickserv"
];
outputs = [
"out" # keep the default output but don't use it
"appsluggr"
"johaus"
"license"
"mainsanow"
"prefix"
"quickserv"
];
installPhase = ''
dir=$GOPATH/bin
install -D $dir/appsluggr $appsluggr/bin/appsluggr
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
install -D $dir/quickserv $quickserv/bin/quickserv
# let nix know that everything was fine
touch $out
'';
};
in {
appsluggr = out.appsluggr;
johaus = out.johaus;
license = out.license;
mainsanow = out.mainsanow;
prefix = out.prefix;
quickserv = out.quickserv;
}