37 lines
902 B
Nix
37 lines
902 B
Nix
{
|
|
description = "Top-level Nix flake for script dependencies";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
outputs = {
|
|
nixpkgs,
|
|
flake-utils,
|
|
self,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
# inherit (pkgs) lib;
|
|
in {
|
|
packages.nure-work = pkgs.stdenv.mkDerivation rec {
|
|
pname = "nure-work";
|
|
version = "0.0.1";
|
|
|
|
buildInputs = [pkgs.nushell];
|
|
|
|
phases = "installPhase";
|
|
installPhase = ''
|
|
cp -r ${pkgs.writeScriptBin "nw" (builtins.readFile ./.config/create-work.nu)}/ $out/
|
|
'';
|
|
};
|
|
devShells.default = pkgs.mkShellNoCC {
|
|
packages = with pkgs; [
|
|
self.packages.${system}.nure-work
|
|
nushell
|
|
just
|
|
];
|
|
};
|
|
});
|
|
}
|