From 1ebef7aad29aa102b2aaa2518fe4a7ec1b796339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Wed, 8 Oct 2025 19:42:04 +0100 Subject: [PATCH] initial commit --- source/recipes/build/nixpkg/flake.nix | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 source/recipes/build/nixpkg/flake.nix diff --git a/source/recipes/build/nixpkg/flake.nix b/source/recipes/build/nixpkg/flake.nix new file mode 100644 index 0000000..717f6ad --- /dev/null +++ b/source/recipes/build/nixpkg/flake.nix @@ -0,0 +1,42 @@ +{ + description = "a very simple and friendly flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells = rec { + default = pkgs.mkShell { + packages = [ pkgs.cowsay ]; + }; + }; + + packages = rec { + hello = pkgs.writeShellApplication { + name = "hello-cow"; + + runtimeInputs = [ + pkgs.cowsay + ]; + + text = '' + cowsay "hello"; + ''; + }; + default = hello; + }; + + apps = rec { + hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; }; + default = hello; + }; + } + ); +}