nixos/scripts/_template/flake.nix

34 lines
741 B
Nix

{
description = "_template package and shell environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
};
outputs =
{ 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 ];
};
};
}