Add src revision control software
This commit is contained in:
parent
4027494334
commit
5c7c63af66
38
pkgs/applications/version-management/src/default.nix
Normal file
38
pkgs/applications/version-management/src/default.nix
Normal file
@ -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;
|
||||
};
|
||||
}
|
30
pkgs/applications/version-management/src/path.patch
Normal file
30
pkgs/applications/version-management/src/path.patch
Normal file
@ -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
|
||||
|
@ -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 {};
|
||||
|
Loading…
Reference in New Issue
Block a user