testing nix overlay 3
This commit is contained in:
parent
ae9b1bf2d8
commit
25a07b02bc
39
flake.nix
39
flake.nix
@ -1,15 +1,26 @@
|
|||||||
{
|
{
|
||||||
description = "swatch beat internet time";
|
description = "swatch beat internet time";
|
||||||
|
|
||||||
inputs.nixpkgs.url = github:Nixos/nixpkgs/nixos-20.03;
|
inputs.nixpkgs.url = github:Nixos/nixpkgs/nixos-20.03;
|
||||||
|
|
||||||
outputs = { self, nixpkgs }: {
|
outputs = { self, nixpkgs }: {
|
||||||
overlay = final: prev: {
|
let
|
||||||
swatch = with final; self.defaultPackage.x86_64-linux;
|
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
||||||
};
|
forAllSystems =
|
||||||
defaultPackage.x86_64-linux =
|
f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
||||||
with import nixpkgs { system = "x86_64-linux"; };
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "swatch-${version}";
|
|
||||||
version = "1.0.0";
|
version = "1.0.0";
|
||||||
|
in {
|
||||||
|
|
||||||
|
overlay = final: prev: {
|
||||||
|
swatch = with final; let nix = final.nix; in stdenv.mkDerivation {
|
||||||
|
name = "swatch-${version}";
|
||||||
|
buildInputs = [ gawk utillinux ];
|
||||||
|
src = self;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ./swatch.sh $out/bin/swatch
|
||||||
|
chmod +x $out/bin/swatch
|
||||||
|
'';
|
||||||
meta = {
|
meta = {
|
||||||
description = "Display the current swatch beats";
|
description = "Display the current swatch beats";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
@ -20,13 +31,13 @@
|
|||||||
maintainers = [ "Shaun Kerr - s@p7.co.nz" ];
|
maintainers = [ "Shaun Kerr - s@p7.co.nz" ];
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = stdenv.lib.platforms.all;
|
||||||
};
|
};
|
||||||
src = self;
|
|
||||||
buildInputs = [
|
|
||||||
gawk
|
|
||||||
utillinux
|
|
||||||
];
|
|
||||||
buildPhase = "cp ./swatch.sh ./swatch";
|
|
||||||
installPhase = "mkdir -p $out/bin; install -t $out/bin swatch";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultPackage =
|
||||||
|
forAllSystems (system: (import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ self.overlay nix.overlay ];
|
||||||
|
}).swatch);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user