nixpkgs/pkgs/tools/package-management/nixui/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.2 KiB
Nix
Raw Normal View History

2022-03-29 11:03:55 +00:00
{ lib, stdenv, pkgs, fetchFromGitHub, nix, node_webkit, makeDesktopItem
2015-11-17 10:37:39 +00:00
, writeScript }:
2015-01-23 14:55:09 +00:00
let
2016-08-31 12:34:13 +00:00
nixui = (import ./nixui.nix {
inherit pkgs;
inherit (stdenv.hostPlatform) system;
})."nixui-git+https://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
2022-03-29 11:03:55 +00:00
stdenv.mkDerivation rec {
pname = "nixui";
2022-03-29 11:03:55 +00:00
version = "0.2.1";
src = fetchFromGitHub {
owner = "matejc";
repo = "nixui";
rev = version;
sha256 = "sha256-KisdzZIB4wYkJojGyG9SCsR+9d6EGuDX6mro/yiJw6s=";
};
2015-01-23 14:55:09 +00:00
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";
homepage = "https://github.com/matejc/nixui";
2021-01-15 09:19:50 +00:00
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.matejc ];
platforms = lib.platforms.unix;
2015-01-23 14:55:09 +00:00
};
}