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
}:
{
uninsane-dot-org = with pkgs; stdenv.mkDerivation {
name = "uninsane-dot-org";
src = ./.;
buildInputs = [ rsync zola ];
nativeBuildInputs = [ gnumake ];
preInstall = ''
mkdir -p $out/share/uninsane-dot-org
'';
postInstall = ''
rm $out/share/uninsane-dot-org/404.html
'';
installFlags = [ "PREFIX=$(out)/share/uninsane-dot-org" ];
};
stdenv.mkDerivation {
name = "uninsane-dot-org";
src = ./.;
buildInputs = [ rsync zola ];
nativeBuildInputs = [ gnumake ];
preInstall = ''
mkdir -p $out/share/uninsane-dot-org
'';
postInstall = ''
rm $out/share/uninsane-dot-org/404.html
'';
installFlags = [ "PREFIX=$(out)/share/uninsane-dot-org" ];
}

View File

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

View File

@ -1,26 +1,23 @@
{
description = "https://uninsane.org blog";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
flake-utils.url = github:numtide/flake-utils;
inputs.nixpkgs.url = "nixpkgs/nixos-23.05";
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);
};
})
);
}