15 lines
413 B
Nix
15 lines
413 B
Nix
|
{ pkgs ? import <nixpkgs> {} }:
|
|||
|
|
|||
|
pkgs.mkShell {
|
|||
|
nativeBuildInputs = with pkgs; [
|
|||
|
gitAndTools.pre-commit
|
|||
|
(python3.withPackages(ps: [ ps.virtualenv ]))
|
|||
|
];
|
|||
|
shellHook = ''
|
|||
|
# black’s 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
|
|||
|
'';
|
|||
|
}
|