scripts/shell.nix
Simon Bruder ecd7808dd1
Make scripts suitable for running on NixOS
Older scripts (that now have no real purpose) or ones that require
packages that are not in nixpkgs are not updated. They should either be
removed or fixed at a later date.
2020-08-25 23:52:58 +02:00

15 lines
413 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
gitAndTools.pre-commit
(python3.withPackages(ps: [ ps.virtualenv ]))
];
shellHook = ''
# blacks pre-commit hook builds a wheel (zip file) for black and fails
# when the timestamp is lower than 1980 (due to zip limitations)
export SOURCE_DATE_EPOCH=315532800
pre-commit install -f >/dev/null
'';
}