30 lines
699 B
Nix
30 lines
699 B
Nix
{
|
|
description = "_template package and shell environment";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, ... }: let
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system}.pkgs;
|
|
name = builtins.baseNameOf (builtins.toString ./.);
|
|
shellApplication = pkgs.writeShellApplication {
|
|
inherit name;
|
|
|
|
text = builtins.readFile ./${name}.sh;
|
|
|
|
runtimeInputs = with pkgs; [
|
|
coreutils
|
|
gnused
|
|
unixtools.column
|
|
];
|
|
};
|
|
in {
|
|
packages.${system}.default = shellApplication;
|
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
packages = [ shellApplication ];
|
|
};
|
|
};
|
|
} |