generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
47 lines (39 loc) · 952 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
*/
{ lib
, pkgs
, stdenv
, fetchFromGitHub
, python3
, subversion
, gnutar
, writeShellScript
}:
let
git = pkgs.git.override { svnSupport = true; };
in
stdenv.mkDerivation rec {
pname = "svn2github";
version = "2019-03-04";
src = fetchFromGitHub {
repo = pname;
owner = "gabrys";
rev = "2d4cec6fb2719e1a0d15656c320249d75c375e15";
sha256 = "0c9335zifapawrb93igz4yi21i0ry10c42v4n4q0pvyc744hh8bh";
};
wrapper = writeShellScript "svn2github-wrapper" ''
PATH=${lib.makeBinPath buildInputs}
exec python3 ${src}/svn2github.py "$@"
'';
buildInputs = [ python3 subversion git gnutar ];
installPhase = ''
mkdir -p $out/bin
cp ${wrapper} $out/bin/svn2github
'';
meta = with lib; {
description = "Mirror SVN repositories to GitHub";
homepage = "https://github.com/gabrys/svn2github";
license = licenses.mit;
};
}