nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 78 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 installShellFiles, 6}: 7 8stdenv.mkDerivation { 9 pname = "with"; 10 version = "0-unstable-2018-03-20"; 11 12 src = fetchFromGitHub { 13 owner = "mchav"; 14 repo = "With"; 15 rev = "28eb40bbc08d171daabf0210f420477ad75e16d6"; 16 hash = "sha256-mKHsLHs9/I+NUdb1t9wZWkPxXcsBlVWSj8fgZckXFXk="; 17 }; 18 19 nativeBuildInputs = [ installShellFiles ]; 20 21 installPhase = '' 22 runHook preInstall 23 install -D with $out/bin/with 24 installShellCompletion --bash --name with.bash with.bash-completion 25 runHook postInstall 26 ''; 27 28 meta = { 29 homepage = "https://github.com/mchav/With"; 30 description = "Command prefixing for continuous workflow using a single tool"; 31 longDescription = '' 32 with is a Bash script that starts an interactive shell with where every 33 command is prefixed using <program>. 34 35 For example: 36 37 $ with git 38 git> add . 39 git> commit -a -m "Committed" 40 git> push 41 42 Can also be used for compound commands. 43 44 $ with java Primes 45 java Primes> 1 46 2 47 java Primes> 4 48 7 49 50 And to repeat commands: 51 52 $ with gcc -o output input.c 53 gcc -o -output input.c> 54 <enter> 55 Compiling... 56 gcc -o -output input.c> 57 58 To execute a shell command proper prefix line with :. 59 60 git> :ls 61 62 You can also drop, add, and replace different commands. 63 64 git> +add 65 git add> <some file> 66 git add> !commit 67 git commit> <arguments and message> 68 git commit> - 69 git> 70 71 To exit use either :q or :exit. 72 ''; 73 license = lib.licenses.asl20; 74 maintainers = [ ]; 75 platforms = lib.platforms.unix; 76 mainProgram = "with"; 77 }; 78}