2019-02-26 14:45:54 +03:00
|
|
|
{ stdenv, fetchgit, electron, runtimeShell } :
|
2016-06-17 13:06:12 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-05-28 15:59:57 +03:00
|
|
|
name = "nix-tour-${version}";
|
|
|
|
version = "0.0.1";
|
2016-06-17 13:06:12 +03:00
|
|
|
|
|
|
|
buildInputs = [ electron ];
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/nixcloud/tour_of_nix";
|
2018-05-28 15:59:57 +03:00
|
|
|
rev = "v${version}";
|
2016-06-17 13:06:12 +03:00
|
|
|
sha256 = "09b1vxli4zv1nhqnj6c0vrrl51gaira94i8l7ww96fixqxjgdwvb";
|
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -R * $out/share
|
|
|
|
chmod 0755 $out/share/ -R
|
2019-02-26 14:45:54 +03:00
|
|
|
echo "#!${runtimeShell}" > $out/bin/nix-tour
|
2016-06-17 13:06:12 +03:00
|
|
|
echo "cd $out/share/" >> $out/bin/nix-tour
|
|
|
|
echo "${electron}/bin/electron $out/share/electron-main.js" >> $out/bin/nix-tour
|
|
|
|
chmod 0755 $out/bin/nix-tour
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "'the tour of nix' from nixcloud.io/tour as offline version";
|
2017-08-01 23:03:30 +03:00
|
|
|
homepage = https://nixcloud.io/tour;
|
2016-06-17 13:06:12 +03:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ qknight ];
|
|
|
|
};
|
|
|
|
|
2018-05-28 15:59:57 +03:00
|
|
|
}
|