generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
43 lines (39 loc) · 1.07 KB
/
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
/*
nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
./result/bin/github-downloader.sh
*/
{ stdenv
, lib
, fetchFromGitHub
, bash
, subversion
, makeWrapper
}:
let
baseVersion = "2020-06-30";
rev = "08049f6183e559a9a97b1d144c070a36118cca97";
sha256 = "073jkky5svrb7hmbx3ycgzpb37hdap7nd9i0id5b5yxlcnf7930r";
in
stdenv.mkDerivation {
pname = "github-downloader";
version = "${baseVersion}.${builtins.substring 0 7 rev}";
src = fetchFromGitHub {
owner = "Decad";
repo = "github-downloader";
inherit rev sha256;
};
buildInputs = [ bash subversion ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp github-downloader.sh $out/bin/github-downloader.sh
wrapProgram $out/bin/github-downloader.sh \
--prefix PATH : ${lib.makeBinPath [ bash subversion ]}
'';
meta = with lib; {
description = "Download folders and files from github without cloning";
homapage = "https://github.com/Decad/github-downloader";
#license = licenses.mit; # no license
platforms = platforms.linux;
};
}