remove flake-utils stupidity, and adhere to "overlays.default" output naming

This commit is contained in:
Colin 2023-12-18 19:24:04 +00:00
parent ee722a1373
commit d4af8bdf0a
3 changed files with 41 additions and 43 deletions

View File

@ -1,17 +1,19 @@
{ pkgs }: { stdenv
, gnumake
, rsync
, zola
}:
{ stdenv.mkDerivation {
uninsane-dot-org = with pkgs; stdenv.mkDerivation { name = "uninsane-dot-org";
name = "uninsane-dot-org"; src = ./.;
src = ./.; buildInputs = [ rsync zola ];
buildInputs = [ rsync zola ]; nativeBuildInputs = [ gnumake ];
nativeBuildInputs = [ gnumake ]; preInstall = ''
preInstall = '' mkdir -p $out/share/uninsane-dot-org
mkdir -p $out/share/uninsane-dot-org '';
''; postInstall = ''
postInstall = '' rm $out/share/uninsane-dot-org/404.html
rm $out/share/uninsane-dot-org/404.html '';
''; installFlags = [ "PREFIX=$(out)/share/uninsane-dot-org" ];
installFlags = [ "PREFIX=$(out)/share/uninsane-dot-org" ];
};
} }

View File

@ -5,17 +5,16 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1701680307,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "id": "flake-utils",
"repo": "flake-utils", "type": "indirect"
"type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {

View File

@ -1,26 +1,23 @@
{ {
description = "https://uninsane.org blog"; description = "https://uninsane.org blog";
inputs = { inputs.nixpkgs.url = "nixpkgs/nixos-23.05";
nixpkgs.url = "nixpkgs/nixos-23.05";
flake-utils.url = github:numtide/flake-utils; outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ self.outputs.overlays.default ];
};
in with self.outputs.packages.x86_64-linux;
{
overlays.default = final: prev: with final; {
uninsane-dot-org = callPackage ./default.nix { };
};
packages.x86_64-linux = pkgs;
defaultPackage.x86_64-linux = uninsane-dot-org;
devShells.default = mkShell {
buildInputs = with uninsane-dot-org; (buildInputs ++ nativeBuildInputs);
};
}; };
outputs = { self, nixpkgs, flake-utils }:
{
overlay = final: prev: import ./default.nix { pkgs = final; };
} //
(
with flake-utils.lib; eachSystem allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
in
rec {
packages = import ./default.nix { inherit pkgs; };
defaultPackage = packages.uninsane-dot-org;
devShells.default = with pkgs; mkShell {
buildInputs = with packages.uninsane-dot-org; (buildInputs ++ nativeBuildInputs);
};
})
);
} }