@@ -0,0 +1,37 @@
1+{ stdenv, fetchFromGitHub }:
2+
3+stdenv.mkDerivation rec {
4+ name = "cde-${version}";
5+ version = "0.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "pgbovine";
9+ repo = "CDE";
10+ sha256 = "0raiz7pczkbnzxpg7g59v7gdp1ipkwgms2vh3431snw1va1gjzmk";
11+ rev = "v${version}";
12+ };
13+
14+ # The build is small, so there should be no problem
15+ # running this locally. There is also a use case for
16+ # older systems, where modern binaries might not be
17+ # useful.
18+ preferLocalBuild = true;
19+
20+ patchBuild = ''
21+ sed '/install/d' $src/Makefile > $src/Makefile
22+ '';
23+
24+ installPhase = ''
25+ mkdir -p $out/bin
26+ cp cde $out/bin
27+ cp cde-exec $out/bin
28+ '';
29+
30+ meta = with stdenv.lib; {
31+ homepage = https://github.com/pgbovine/CDE;
32+ description = "A packaging tool for building portable packages";
33+ license = licenses.gpl3;
34+ maintainers = [ maintainers.rlupton20 ];
35+ platforms = platforms.linux;
36+ };
37+}