2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, pkgs, fetchgit, nix, node_webkit, makeDesktopItem
|
2015-11-17 10:37:39 +00:00
|
|
|
, writeScript }:
|
2015-01-23 14:55:09 +00:00
|
|
|
let
|
2015-11-17 10:37:39 +00:00
|
|
|
version = "0.2.1";
|
2015-01-23 14:55:09 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "git://github.com/matejc/nixui.git";
|
2015-11-17 10:37:39 +00:00
|
|
|
rev = "845a5f4a33f1d0c509c727c130d0792a5b450a38";
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "1ay3i4lgzs3axbby06l4vvspxi0aa9pwiil84qj0dqq1jb6isara";
|
2015-01-23 14:55:09 +00:00
|
|
|
};
|
2016-08-31 13:34:13 +01:00
|
|
|
nixui = (import ./nixui.nix {
|
|
|
|
inherit pkgs;
|
2018-08-20 20:11:29 +01:00
|
|
|
inherit (stdenv.hostPlatform) system;
|
2016-08-31 13:34:13 +01:00
|
|
|
})."nixui-git://github.com/matejc/nixui.git#0.2.1";
|
2015-01-23 14:55:09 +00:00
|
|
|
script = writeScript "nixui" ''
|
|
|
|
#! ${stdenv.shell}
|
|
|
|
export PATH="${nix}/bin:\$PATH"
|
|
|
|
${node_webkit}/bin/nw ${nixui}/lib/node_modules/nixui/
|
|
|
|
'';
|
|
|
|
desktop = makeDesktopItem {
|
|
|
|
name = "nixui";
|
|
|
|
exec = script;
|
|
|
|
icon = "${nixui}/lib/node_modules/nixui/img/128.png";
|
|
|
|
desktopName = "NixUI";
|
|
|
|
genericName = "NixUI";
|
|
|
|
};
|
|
|
|
in
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "nixui";
|
2015-01-23 14:55:09 +00:00
|
|
|
inherit version src;
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s ${script} $out/bin/nixui
|
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktop}/share/applications/* $out/share/applications/
|
|
|
|
'';
|
|
|
|
meta = {
|
|
|
|
description = "NodeWebkit user interface for Nix";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/matejc/nixui";
|
2015-11-17 10:37:39 +00:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
2015-01-23 14:55:09 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.matejc ];
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|