nixos/shell.nix

33 lines
849 B
Nix
Raw Normal View History

2022-01-03 20:00:40 +01:00
{ pkgs ? import <nixpkgs> { } }:
let
nix-refactor = pkgs.writeShellScriptBin "nix-refactor" ''
origin=$(${pkgs.coreutils-full}/bin/readlink /run/current-system)
result=$(${pkgs.lib.getExe pkgs.nixos-rebuild} build && ${pkgs.coreutils-full}/bin/readlink result)
${pkgs.diffutils}/bin/diff -q <(echo "$origin" ) <(echo "$result")
rm ./result
'';
in
2022-01-03 20:00:40 +01:00
pkgs.mkShell {
name = "nixosbuildshell";
nativeBuildInputs = with pkgs; [
git
nixFlakes
nix-refactor
2022-01-04 21:52:27 +01:00
python3
2023-01-30 15:06:09 +01:00
python310Packages.autopep8
python310Packages.black
python310Packages.flake8
python310Packages.jedi
python310Packages.pip
python310Packages.yapf
2023-06-12 15:22:45 +02:00
vim
2022-01-03 20:00:40 +01:00
];
shellHook = ''
PATH=${pkgs.writeShellScriptBin "nix" ''
${pkgs.nixFlakes}/bin/nix --experimental-features "nix-command flakes" "$@"
''}/bin:$PATH
'';
}