nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 45 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5}: 6 7stdenv.mkDerivation { 8 pname = "ondir"; 9 version = "0.2.3"; 10 11 src = fetchFromGitHub { 12 owner = "alecthomas"; 13 repo = "ondir"; 14 rev = "cb2f9f8b21e336165fc0a310d677fda75c8e8513"; 15 hash = "sha256-XTZKFIzJ3xL8ae3zG8nsMhGWvpvRUAQ2b6q/Q1QvGd0="; 16 }; 17 18 installPhase = '' 19 runHook preInstall 20 21 make DESTDIR="$out" PREFIX= install 22 cp scripts.* $out 23 24 runHook postInstall 25 ''; 26 27 meta = { 28 description = "Small program to automate tasks specific to certain directories"; 29 longDescription = '' 30 It works by executing scripts in directories when you enter and leave them. 31 This is done by overriding the shell builtins cd, pushd, and popd, 32 which is a manual action. 33 The user is required to add a snippet to their shell initialisation file like .bashrc or .profile. 34 35 Which commands are executed on directory entry and leave is done 36 in predefined locations with a .ondirrc file. 37 38 See man ondir for more information 39 ''; 40 homepage = "https://github.com/alecthomas/ondir/"; 41 license = lib.licenses.gpl2Only; 42 maintainers = [ lib.maintainers.michaelCTS ]; 43 mainProgram = "ondir"; 44 }; 45}