~jshholland/doomsday

87d8c7d5f69df7e05d1bf991e88db3780474c224 — Josh Holland 3 months ago 98653a8
update flake to include an overlay
1 files changed, 16 insertions(+), 13 deletions(-)

M flake.nix
M flake.nix => flake.nix +16 -13
@@ 3,20 3,23 @@
    "A utility to practise calculating the day of the week of random dates";

  outputs = { self, nixpkgs }: {
    overlay = final: prev: {
      doomsday = with final;
        stdenvNoCC.mkDerivation {
          name = "doomsday";
          src = self;
          buildInputs = [ zig ];
          doConfigure = false;
          buildPhase = ''
            export XDG_CACHE_HOME=cachedir
            mkdir $out
            zig build install --prefix $out -Drelease-safe=true
          '';
          installPhase = "true";
        };
    };

    defaultPackage.x86_64-linux =
      with import nixpkgs { system = "x86_64-linux"; };
      stdenvNoCC.mkDerivation {
        name = "doomsday";
        src = self;
        buildInputs = [ zig ];
        doConfigure = false;
        buildPhase = ''
          export XDG_CACHE_HOME=cachedir
          mkdir $out
          zig build install --prefix $out -Drelease-safe=true
        '';
        installPhase = "true";
      };
      (import nixpkgs { system = "x86_64-linux"; overlays = [ self.overlay ]; }).doomsday;
  };
}