swatch beats internet time
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2KB

  1. {
  2. description = "swatch beat internet time";
  3. inputs.nixpkgs.url = github:Nixos/nixpkgs/nixos-20.03;
  4. outputs = { self, nixpkgs }:
  5. let
  6. supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
  7. forAllSystems =
  8. f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
  9. version = "1.0.0";
  10. in {
  11. overlay = final: prev: {
  12. swatch = with final; stdenv.mkDerivation {
  13. name = "swatch-${version}";
  14. buildInputs = [ gawk utillinux ];
  15. src = self;
  16. installPhase = ''
  17. mkdir -p $out/bin
  18. cp ./swatch.sh $out/bin/swatch
  19. chmod +x $out/bin/swatch
  20. '';
  21. meta = {
  22. description = "Display the current swatch beats";
  23. longDescription = ''
  24. Prints the current Swatch Internet Time.
  25. Optional short form.
  26. '';
  27. homepage = https://github.com/techieAgnostic/swatch;
  28. maintainers = [ "Shaun Kerr - s@p7.co.nz" ];
  29. platforms = lib.platforms.all;
  30. };
  31. };
  32. };
  33. defaultPackage =
  34. forAllSystems (system: (import nixpkgs {
  35. inherit system;
  36. overlays = [ self.overlay ];
  37. }).swatch);
  38. };
  39. }