diff --git a/README.md b/README.md index fe8dd91d00fd721800ff19319b7e078ce86db9fe..f20cea826294cc905584c3a2d7db32ca10a81577 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# flake +# devflake -Create a simple `flake.nix` for nix. +Create a simple `flake.nix` for `nix develop` ## License -[MIT](LICENSE) +[MIT](LICENSE) \ No newline at end of file diff --git a/template/flake.nix b/template/flake.nix index 5f5ac8ae0179cf9cd08a9f1d6271eb6bb8a96a36..80eaa0997ce96a488c44221c59781f8481c7aeea 100644 --- a/template/flake.nix +++ b/template/flake.nix @@ -1,54 +1,34 @@ { - description = "{{description}}"; - inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}"; - outputs = { + inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}"; self, + inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}"; nixpkgs, + inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}"; }: let - systems = [ + - "x86_64-linux" + outputs = { - "x86_64-darwin" - "aarch64-linux" - "aarch64-darwin" + self, -{ inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}"; + systems = [ + nixpkgs, -{ outputs = { + outputs = { { - self, system: let pkgs = nixpkgs.legacyPackages.${system}; in { - {{if pname}} - packages.${system}.default = pkgs.buildGoModule { - pname = {{pname}}; - version = {{version}}; - src = ./.; - description = "{{description}}"; outputs = { description = "{{description}}"; - self, - description = "{{description}}"; - homepage = "{{url}}"; - maintainers = with maintainers; [jolheiser]; - mainProgram = "{{pname}}"; - }; - }; - {{end}} - {{if packages}} - devShells.${system}.default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ {{- range $pkg := (splitList "\n" packages)}} {{trim $pkg}} {{- end}} ]; }; - {{end}} } - ) - inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}"; + outputs = { - inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}"; + outputs = { inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}"; diff --git a/tmpl.yaml b/tmpl.yaml index 7ae4c08cf8d2e90a354db9b38d62e7c53eb03182..965a5d67c1e67a7ee436a6acdd88cc8976b2fd9a 100644 --- a/tmpl.yaml +++ b/tmpl.yaml @@ -2,19 +2,6 @@ prompts: - id: unstable label: Use unstable type: confirm - - id: pname - label: pname - help: Program name - type: input - - id: version - label: Version - type: input - - id: description - label: Description - type: multi - - id: url - label: Project URL - type: input - id: packages label: Packages help: nixpkgs, one on each line