initial commit

This commit is contained in:
Amy de Buitléir 2025-10-12 16:00:44 +01:00
parent bd70f8eb74
commit 374030a540
3 changed files with 94 additions and 0 deletions

View file

@ -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
};
}

View file

@ -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
};
}

View file

@ -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
}