testing nix overlay 3

This commit is contained in:
Thorn Avery 2020-10-03 23:01:39 +13:00
parent ae9b1bf2d8
commit 25a07b02bc

View File

@ -1,32 +1,43 @@
{ {
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"; }; version = "1.0.0";
stdenv.mkDerivation rec { in {
name = "swatch-${version}";
version = "1.0.0"; overlay = final: prev: {
meta = { swatch = with final; let nix = final.nix; in stdenv.mkDerivation {
description = "Display the current swatch beats"; name = "swatch-${version}";
longDescription = '' buildInputs = [ gawk utillinux ];
Prints the current Swatch Internet Time. src = self;
Optional short form. installPhase = ''
mkdir -p $out/bin
cp ./swatch.sh $out/bin/swatch
chmod +x $out/bin/swatch
''; '';
homepage = https://github.com/techieAgnostic/swatch; meta = {
maintainers = [ "Shaun Kerr - s@p7.co.nz" ]; description = "Display the current swatch beats";
platforms = stdenv.lib.platforms.all; longDescription = ''
Prints the current Swatch Internet Time.
Optional short form.
'';
homepage = https://github.com/techieAgnostic/swatch;
maintainers = [ "Shaun Kerr - s@p7.co.nz" ];
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);
}; };
} }