smaller resulting packages
This commit is contained in:
parent
d5a165fb51
commit
c14c5475e2
|
@ -0,0 +1,13 @@
|
|||
FROM monacoremo/nix:2020-01-31-62bbc2ab
|
||||
RUN nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs \
|
||||
&& nix-channel --update
|
||||
ENV USER root
|
||||
RUN nix-env -i gnutar gzip \
|
||||
&& nix-env -iA cachix -f https://cachix.org/api/v1/install \
|
||||
&& cachix use xe \
|
||||
&& nix-env -e cachix \
|
||||
&& nix-collect-garbage
|
||||
|
||||
WORKDIR /xe/pkgs
|
||||
COPY . .
|
||||
RUN nix-build default.nix && nix-collect-garbage
|
|
@ -5,8 +5,14 @@ let
|
|||
|
||||
callPackage = pkgs.lib.callPackageWith (pkgs // self);
|
||||
|
||||
x = callPackage ./pkgs/x { };
|
||||
|
||||
self = {
|
||||
MoonPlus = callPackage ./pkgs/moonplus { };
|
||||
x = callPackage ./pkgs/x { };
|
||||
appsluggr = x.appsluggr;
|
||||
johaus = x.johaus;
|
||||
license = x.license;
|
||||
mainsanow = x.mainsanow;
|
||||
prefix = x.prefix;
|
||||
};
|
||||
in self
|
||||
|
|
|
@ -4,21 +4,21 @@ let
|
|||
repo = fetchFromGitHub {
|
||||
owner = "pigpigyyy";
|
||||
repo = "MoonPlus";
|
||||
rev = "57191ed45bb7bd0ffcd917f00df2e940c900fb3c";
|
||||
sha256 = "0scbi3d83g7yr51gnxasz2h924wyhbfq3c4a7c7sb0rrzb7m8ln7";
|
||||
rev = "2e50c15bfe67d4709880a0377d37fca191be2f3e";
|
||||
sha256 = "0h4kh20qi457mbwi4v7apji4kxqi8razys4aqp4z5v9d7zy0d0zz";
|
||||
};
|
||||
|
||||
defaultAttrs = {
|
||||
builder = ./builder.sh;
|
||||
baseInputs = [];
|
||||
src = repo;
|
||||
version = "HEAD-57191ed4";
|
||||
version = "HEAD-2e50c15";
|
||||
name = "MoonPlus";
|
||||
system = builtins.currentSystem;
|
||||
|
||||
installPhase = ''
|
||||
ls
|
||||
install -D bin/release/moonc $out/bin/moonc
|
||||
install -D bin/release/moonp $out/bin/moonp
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -17,11 +17,42 @@ let
|
|||
CGO_ENABLED="0";
|
||||
|
||||
# TODO: remove references to go in the non-default output
|
||||
allowGoReference = true;
|
||||
allowGoReference = false;
|
||||
|
||||
subPackages = [
|
||||
"./..."
|
||||
"cmd/appsluggr"
|
||||
"cmd/johaus"
|
||||
"cmd/license"
|
||||
"cmd/mainsanow"
|
||||
"cmd/prefix"
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out" # keep the default output but don't use it
|
||||
"appsluggr"
|
||||
"johaus"
|
||||
"license"
|
||||
"mainsanow"
|
||||
"prefix"
|
||||
];
|
||||
|
||||
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
|
||||
# let nix know that everything was fine
|
||||
touch $out
|
||||
'';
|
||||
};
|
||||
|
||||
in out
|
||||
in
|
||||
{
|
||||
appsluggr = out.appsluggr;
|
||||
johaus = out.johaus;
|
||||
license = out.license;
|
||||
mainsanow = out.mainsanow;
|
||||
prefix = out.prefix;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue