Commit 80a1c429c8

80a1c429c8d36c36d0f4e4f9c3d43aa07c397509

parent: b3b06d421c

Unregistered key

diniamo <55629891+diniamo@users.noreply.github.com> · 2025-03-02 15:22 UTC
committer: <noreply@github.com>

Nix: remove flake-parts dependency (#52)

Layout: unified · split

flake.lock −21
@@ -1,25 +1,5 @@
1{ 1{
2 "nodes": { 2 "nodes": {
3 "flake-parts": {
4 "inputs": {
5 "nixpkgs-lib": [
6 "nixpkgs"
7 ]
8 },
9 "locked": {
10 "lastModified": 1738453229,
11 "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
12 "owner": "hercules-ci",
13 "repo": "flake-parts",
14 "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
15 "type": "github"
16 },
17 "original": {
18 "owner": "hercules-ci",
19 "repo": "flake-parts",
20 "type": "github"
21 }
22 },
23 "nixpkgs": { 3 "nixpkgs": {
24 "locked": { 4 "locked": {
25 "lastModified": 1737469691, 5 "lastModified": 1737469691,
@@ -38,7 +18,6 @@
38 }, 18 },
39 "root": { 19 "root": {
40 "inputs": { 20 "inputs": {
41 "flake-parts": "flake-parts",
42 "nixpkgs": "nixpkgs", 21 "nixpkgs": "nixpkgs",
43 "systems": "systems" 22 "systems": "systems"
44 } 23 }
flake.nix +17 −21
@@ -4,33 +4,29 @@
4 inputs = { 4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6 systems.url = "github:nix-systems/default"; 6 systems.url = "github:nix-systems/default";
7 flake-parts = {
8 url = "github:hercules-ci/flake-parts";
9 inputs.nixpkgs-lib.follows = "nixpkgs";
10 };
11 }; 7 };
12 8
13 outputs = { 9 outputs = {
14 nixpkgs, 10 nixpkgs,
15 systems, 11 systems,
16 flake-parts, 12 self,
17 ... 13 ...
18 } @ inputs: 14 }: let
19 flake-parts.lib.mkFlake {inherit inputs;} { 15 eachSystem = nixpkgs.lib.genAttrs (import systems);
20 systems = import systems; 16 in {
17 packages = eachSystem (system: let
18 package = nixpkgs.legacyPackages.${system}.callPackage ./package.nix {};
19 in {
20 default = package;
21 curd = package;
22 });
21 23
22 perSystem = {pkgs, ...}: let 24 devShells = eachSystem (system: {
23 package = pkgs.callPackage ./package.nix {}; 25 default = nixpkgs.legacyPackages.${system}.mkShellNoCC {
24 in { 26 inputsFrom = [self.packages.${system}.default];
25 packages = {
26 default = package;
27 curd = package;
28 };
29
30 formatter = pkgs.alejandra;
31 devShells.default = pkgs.mkShellNoCC {
32 inputsFrom = [package];
33 };
34 }; 27 };
35 }; 28 });
29
30 formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.alejandra);
31 };
36} 32}