commit 4edd6c651be10b7768403a810245d146a4afab76
parent 03bdbaac1e834c8225f45dd97fb9e87b5f8c86bb
Author: Katja (ctucx) <git@ctu.cx>
Date: Wed, 5 Mar 2025 21:02:21 +0100
parent 03bdbaac1e834c8225f45dd97fb9e87b5f8c86bb
Author: Katja (ctucx) <git@ctu.cx>
Date: Wed, 5 Mar 2025 21:02:21 +0100
flake: refactor, remove `flake-utils` dependency
2 files changed, 22 insertions(+), 56 deletions(-)
diff --git a/flake.lock b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1690927903, @@ -36,24 +18,8 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root",
diff --git a/flake.nix b/flake.nix @@ -1,37 +1,38 @@ { + description = "ctucx.website"; - inputs = { - flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; - }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; - outputs = { self, nixpkgs, flake-utils }: { + outputs = inputs: let + forAllSystems = function: + inputs.nixpkgs.lib.genAttrs [ + "x86_64-linux" + "aarch64-linux" + "aarch64-darwin" + ] (system: function (import inputs.nixpkgs { + system = system; + overlays = [ inputs.self.overlays.default ]; + })); - overlay = final: prev: { + in { + packages = forAllSystems (pkgs: { + default = pkgs.ctucx-website; + ctucx-website = pkgs.ctucx-website; + }); + + overlays.default = final: prev: { ctucx-website = final.stdenv.mkDerivation rec { name = "ctucx-homepage"; - src = self; + src = inputs.self; makeFlags = [ "PREFIX=$(out)" ]; buildInputs = [ final.pandoc ]; }; - }; - } // (flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ self.overlay ]; - }; - - in rec { - - packages.default = pkgs.ctucx-website; - packages.ctucx-website = pkgs.ctucx-website; + }; - })); -}- \ No newline at end of file +}