commit 58bd2a442c34488fc4411e31ab299d0af1e06600
parent 6348176e7e144ce1bb442ef8c711a4ba7f60078f
Author: Katja (ctucx) <git@ctu.cx>
Date: Wed, 5 Mar 2025 21:26:16 +0100
parent 6348176e7e144ce1bb442ef8c711a4ba7f60078f
Author: Katja (ctucx) <git@ctu.cx>
Date: Wed, 5 Mar 2025 21:26:16 +0100
flake: refactor, remove `flake-utils` dependency
2 files changed, 28 insertions(+), 46 deletions(-)
diff --git a/flake.lock b/flake.lock @@ -1,39 +1,23 @@ { "nodes": { - "flake-utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1670543317, - "narHash": "sha256-4mMR56rtxKr+Gwz399jFr4i76SQZxsLWxxyfQlPXRm0=", + "lastModified": 1719426051, + "narHash": "sha256-yJL9VYQhaRM7xs0M867ZFxwaONB9T2Q4LnGo1WovuR4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7a6a010c3a1d00f8470a5ca888f2f927f1860a19", + "rev": "89c49874fb15f4124bf71ca5f42a04f2ee5825fd", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } }
diff --git a/flake.nix b/flake.nix @@ -1,39 +1,38 @@ { + description = ""; - inputs = { - flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; - }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.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 { - flauschehorn-sexy = final.nimPackages.buildNimPackage { - name = "flauschehorn-sexy"; - src = self; + packages = forAllSystems (pkgs: { + default = pkgs.flauschehorn-sexy; + flauschehorn-sexy = pkgs.flauschehorn-sexy; + }); + + overlays.default = final: prev: { + flauschehorn-sexy = final.buildNimPackage { + name = "flauschehorn-sexy"; + src = inputs.self; buildInputs = [ final.sqlite ]; - nimBinOnly = true; nimRelease = true; }; - }; - } // (flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ self.overlay ]; - }; - - in rec { - - packages.default = pkgs.flauschehorn-sexy; - packages.flauschehorn-sexy = pkgs.flauschehorn-sexy; + }; - } - )); -}- \ No newline at end of file +}