chore: move back to flake-utils

main
LeMarsu 2024-06-08 20:03:23 +02:00
parent b36722bfe6
commit cbd08e5258
2 changed files with 27 additions and 45 deletions

View File

@ -63,24 +63,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakeCompat": { "flakeCompat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -247,20 +229,19 @@
}, },
"utils": { "utils": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1696281284, "lastModified": 1710146030,
"narHash": "sha256-xcmtTmoiiAOSk4abifbtqVZk0iwBcqJfg47iUbkwhcE=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "gytis-ivaskevicius", "owner": "numtide",
"repo": "flake-utils-plus", "repo": "flake-utils",
"rev": "6cf1e312fb259693c4930d07ca3cbe1d07ef4a48", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "gytis-ivaskevicius", "owner": "numtide",
"ref": "v1.4.0", "repo": "flake-utils",
"repo": "flake-utils-plus",
"type": "github" "type": "github"
} }
}, },

View File

@ -3,7 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.4.0"; utils.url = "github:numtide/flake-utils";
nil.url = "github:oxalica/nil"; nil.url = "github:oxalica/nil";
yants.url = "github:divnix/yants"; yants.url = "github:divnix/yants";
alejandra = { alejandra = {
@ -20,24 +20,25 @@
yants, yants,
... ...
} @ inputs: let } @ inputs: let
versionFile = builtins.replaceStrings ["\n"] [""] (builtins.readFile ./VERSION); inherit (builtins) readFile replaceStrings;
fu = utils.lib;
versionFile = replaceStrings ["\n"] [""] (readFile ./VERSION);
version =
if self.sourceInfo ? dirtyShortRev
then "${versionFile}-${self.sourceInfo.dirtyShortRev}"
else versionFile;
version = if self.sourceInfo ? dirtyShortRev forSystem = system: let
then "${versionFile}-${self.sourceInfo.dirtyShortRev}" pkgs = nixpkgs.legacyPackages.${system};
else versionFile; formatter = alejandra.defaultPackage.${system};
in inherit (inputs.nil.packages.${system}) nil;
utils.lib.mkFlake { in {
inherit self inputs; inherit formatter;
outputsBuilder = channel: let devShells.default = import ./shell.nix {
system = channel.nixpkgs.system; inherit pkgs nil;
in {
formatter = alejandra.defaultPackage.${channel.nixpkgs.system};
devShells.default = import ./shell.nix {
pkgs = channel.nixpkgs;
inherit (inputs.nil.packages.${system}) nil;
};
}; };
lib = import ./lib {inherit version yants;};
}; };
in
(fu.eachDefaultSystem forSystem)
// {lib = import ./lib {inherit version yants;};};
} }