scripts/shell.nix

15 lines
413 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{ 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
'';
}