Minimum template

main
xenia 2023-10-12 15:15:57 +02:00
commit a6eff27454
4 changed files with 76 additions and 0 deletions

25
flake.lock 100644
View File

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1697009197,
"narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

11
flake.nix 100644
View File

@ -0,0 +1,11 @@
{
description = "Some flake templates";
outputs = { self, nixpkgs }: {
template.minimum = {
path = ./minimum;
description = "Minimal sane flake";
welcomeText = "mjau";
};
};
}

20
minimum.nix 100644
View File

@ -0,0 +1,20 @@
{
description = "A bare minimum flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (sys:
let pkgs = nixpkgs.legacyPackages.${sys};
deps = [ pkgs.cowsay ];
package = pkgs.writeScriptBin "program" "echo mjau | ${pkgs.cowsay}/bin/cowsay -f hellokitty";
in rec {
packages.default = package;
devShells.default = pkgs.mkShell {
packages = deps;
};
}
);
}

20
minimum/flake.nix 100644
View File

@ -0,0 +1,20 @@
{
description = "A bare minimum flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (sys:
let pkgs = nixpkgs.legacyPackages.${sys};
deps = [ pkgs.cowsay ];
package = pkgs.writeScriptBin "program" "echo mjau | ${pkgs.cowsay}/bin/cowsay -f hellokitty";
in rec {
packages.default = package;
devShells.default = pkgs.mkShell {
packages = deps;
};
}
);
}