From 374030a540dc38eb4150ba7366e0e63d1bd01b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Sun, 12 Oct 2025 16:00:44 +0100 Subject: [PATCH] initial commit --- source/new-flake/bash-flake/flake-3.nix | 24 ++++++++++++ source/new-flake/bash-flake/flake-4.nix | 50 +++++++++++++++++++++++++ source/new-flake/bash-flake/flake.nix | 20 ++++++++++ 3 files changed, 94 insertions(+) create mode 100644 source/new-flake/bash-flake/flake-3.nix create mode 100644 source/new-flake/bash-flake/flake-4.nix create mode 100644 source/new-flake/bash-flake/flake.nix diff --git a/source/new-flake/bash-flake/flake-3.nix b/source/new-flake/bash-flake/flake-3.nix new file mode 100644 index 0000000..20dd70b --- /dev/null +++ b/source/new-flake/bash-flake/flake-3.nix @@ -0,0 +1,24 @@ +{ + description = "what does the cow say"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + }; + + outputs = { self, nixpkgs }: { + + devShells = + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + ${system}.default = + pkgs.mkShell { + packages = [ + pkgs.cowsay + ]; + }; # mkShell + }; # devShells + + }; +} diff --git a/source/new-flake/bash-flake/flake-4.nix b/source/new-flake/bash-flake/flake-4.nix new file mode 100644 index 0000000..64e9c21 --- /dev/null +++ b/source/new-flake/bash-flake/flake-4.nix @@ -0,0 +1,50 @@ +{ + description = "what does the cow say"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + }; + + outputs = { self, nixpkgs }: { + + devShells = + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + ${system}.default = + pkgs.mkShell { + packages = [ + pkgs.cowsay + ]; + }; # mkShell + }; # devShells + + packages = + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in rec { + ${system}.hello = pkgs.stdenv.mkDerivation { + name = "cow-hello"; + + src = ./.; + + unpackPhase = "true"; + + buildPhase = ":"; + + installPhase = + '' + mkdir -p $out/bin + cp $src/cow-hello.sh $out/bin + chmod +x $out/bin/cow-hello.sh + ''; + + buildInputs = [ pkgs.cowsay ]; + }; + ${system}.default = hello; + + }; # packages + }; +} diff --git a/source/new-flake/bash-flake/flake.nix b/source/new-flake/bash-flake/flake.nix new file mode 100644 index 0000000..0dda850 --- /dev/null +++ b/source/new-flake/bash-flake/flake.nix @@ -0,0 +1,20 @@ +{ + description = "what does the cow say"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + }; + + outputs = { self, nixpkgs }: { + + devShells = { + x86_64-linux.default = + nixpkgs.legacyPackages.x86_64-linux.mkShell { + packages = [ + nixpkgs.legacyPackages.x86_64-linux.cowsay + ]; + }; # mkShell + }; # devShells + + }; # outputs +}