diff --git a/pkgs/applications/version-management/src/default.nix b/pkgs/applications/version-management/src/default.nix new file mode 100644 index 000000000000..d3b0ee9131be --- /dev/null +++ b/pkgs/applications/version-management/src/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, python, rcs, git }: + +stdenv.mkDerivation rec { + name = "src-0.12"; + + src = fetchurl { + url = "http://www.catb.org/~esr/src/${name}.tar.gz"; + sha256 = "1w8k9z2dxim99nniid9kjsc5lzri7m4sd0n819y73aqcdi54lr1s"; + }; + + buildInputs = [ python ]; + + patches = [ ./path.patch ]; + + postPatch = '' + sed -i \ + -e 's|@python@|${python}|' \ + -e 's|@rcs@|${rcs}|' \ + -e 's|@git@|${git}|' \ + src srctest + ''; + + makeFlags = [ "prefix=$(out)" ]; + + doCheck = true; + + meta = { + description = "Simple single-file revision control"; + + homepage = http://www.catb.org/~esr/src/; + + license = [ stdenv.lib.licenses.bsd3 ]; + + maintainers = [ stdenv.lib.maintainers.shlevy ]; + + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/applications/version-management/src/path.patch b/pkgs/applications/version-management/src/path.patch new file mode 100644 index 000000000000..05e643e9e0ff --- /dev/null +++ b/pkgs/applications/version-management/src/path.patch @@ -0,0 +1,30 @@ +diff -Naur src-0.12-orig/src src-0.12/src +--- src-0.12-orig/src 2014-11-21 08:19:59.000000000 -0500 ++++ src-0.12/src 2014-11-21 15:54:54.598113846 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!@python@/bin/python + # + # src - simple revision control. + # +@@ -58,6 +58,8 @@ + + import sys, os, subprocess, time, calendar, stat, glob, shutil, hashlib + ++os.environ['PATH'] = "@rcs@/bin:@git@/bin:" + os.environ['PATH'] ++ + version="0.12" + + def rfc3339(t): +diff -Naur src-0.12-orig/srctest src-0.12/srctest +--- src-0.12-orig/srctest 2014-11-21 08:12:00.000000000 -0500 ++++ src-0.12/srctest 2014-11-21 15:58:31.370500990 -0500 +@@ -12,7 +12,7 @@ + + # Set the PATH to include the current directory, so the repository + # head version of src can always be tested. +-PATH="$(pwd)":$PATH ++PATH="$(pwd)":@git@/bin:$PATH + + trap "rm -fr $SANDBOX" 0 1 2 15 + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 144853788a79..497c027b35f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10668,6 +10668,10 @@ let apiKey = config.libspotify.apiKey or null; }; + src = callPackage ../applications/version-management/src/default.nix { + git = gitMinimal; + }; + stalonetray = callPackage ../applications/window-managers/stalonetray {}; stp = callPackage ../applications/science/logic/stp {};