nixui: include build files

This commit is contained in:
Wout Mertens 2015-01-23 15:55:09 +01:00
parent 4c2554ebf4
commit 70ac34b8c0
4 changed files with 696 additions and 0 deletions

View File

@ -0,0 +1,53 @@
{ stdenv, pkgs, fetchgit, nix, node_webkit, config, makeDesktopItem, writeScript
, profilePaths ? (config.nixui.profilePaths or ["/nix/var/nix/profiles"])
, dataDir ? (config.nixui.dataDir or "/tmp")
, configurations ? (config.nixui.configurations or ["/etc/nixos/configuration.nix"])
, NIX_PATH ? (config.nixui.NIX_PATH or "/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix") }:
let
version = "0.1.0";
src = fetchgit {
url = "git://github.com/matejc/nixui.git";
rev = "refs/tags/${version}";
sha256 = "198inv8ih751fc1l4dvjp9p6k4kfacikab61v6f604d45psnk6qf";
};
nixui = (import ./node-default.nix { nixui = src; inherit pkgs; }).build;
script = writeScript "nixui" ''
#! ${stdenv.shell}
export PATH="${nix}/bin:\$PATH"
export NIXUI_CONFIG="${config}"
${node_webkit}/bin/nw ${nixui}/lib/node_modules/nixui/
'';
config = builtins.toFile "config.json" ''
{
"profilePaths": ${builtins.toJSON profilePaths},
"dataDir": "${dataDir}",
"configurations": ${builtins.toJSON configurations},
"NIX_PATH": "${NIX_PATH}"
}
'';
desktop = makeDesktopItem {
name = "nixui";
exec = script;
icon = "${nixui}/lib/node_modules/nixui/img/128.png";
desktopName = "NixUI";
genericName = "NixUI";
};
in
stdenv.mkDerivation rec {
name = "nixui-${version}";
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";
homepage = https://github.com/matejc/nixui;
license = stdenv.lib.licenses.bsd2;
maintainers = [ stdenv.lib.maintainers.matejc ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -0,0 +1,24 @@
{ nixui ? { outPath = ./.; name = "nixui"; }
, pkgs ? import <nixpkgs> {}
}:
let
nodePackages = import "${pkgs.path}/pkgs/top-level/node-packages.nix" {
inherit pkgs;
inherit (pkgs) stdenv nodejs fetchurl fetchgit;
neededNatives = [ pkgs.python ] ++ pkgs.lib.optional pkgs.stdenv.isLinux pkgs.utillinux;
self = nodePackages;
generated = ./node.nix;
};
in rec {
tarball = pkgs.runCommand "nixui-0.1.0.tgz" { buildInputs = [ pkgs.nodejs ]; } ''
mv `HOME=$PWD npm pack ${nixui}` $out
'';
build = nodePackages.buildNodePackage {
name = "nixui-0.1.0";
src = [ tarball ];
buildInputs = nodePackages.nativeDeps."nixui" or [];
deps = [ nodePackages.by-spec."underscore"."^1.6.0" nodePackages.by-spec."nedb"."~1.0.0" ];
peerDependencies = [];
passthru.names = [ "nixui" ];
};
}

View File

@ -0,0 +1,617 @@
{ self, fetchurl, fetchgit ? null, lib }:
{
by-spec."async"."0.2.10" =
self.by-version."async"."0.2.10";
by-version."async"."0.2.10" = lib.makeOverridable self.buildNodePackage {
name = "async-0.2.10";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/async/-/async-0.2.10.tgz";
name = "async-0.2.10.tgz";
sha1 = "b6bbe0b0674b9d719708ca38de8c237cb526c3d1";
})
];
buildInputs =
(self.nativeDeps."async" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "async" ];
};
by-spec."binary-search-tree"."0.2.4" =
self.by-version."binary-search-tree"."0.2.4";
by-version."binary-search-tree"."0.2.4" = lib.makeOverridable self.buildNodePackage {
name = "binary-search-tree-0.2.4";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.4.tgz";
name = "binary-search-tree-0.2.4.tgz";
sha1 = "14fe106366a59ca8efb68c0ae30c36aaff0cd510";
})
];
buildInputs =
(self.nativeDeps."binary-search-tree" or []);
deps = {
"underscore-1.4.4" = self.by-version."underscore"."1.4.4";
};
peerDependencies = [
];
passthru.names = [ "binary-search-tree" ];
};
by-spec."commander"."0.6.1" =
self.by-version."commander"."0.6.1";
by-version."commander"."0.6.1" = lib.makeOverridable self.buildNodePackage {
name = "commander-0.6.1";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/commander/-/commander-0.6.1.tgz";
name = "commander-0.6.1.tgz";
sha1 = "fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06";
})
];
buildInputs =
(self.nativeDeps."commander" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "commander" ];
};
by-spec."commander"."2.3.0" =
self.by-version."commander"."2.3.0";
by-version."commander"."2.3.0" = lib.makeOverridable self.buildNodePackage {
name = "commander-2.3.0";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/commander/-/commander-2.3.0.tgz";
name = "commander-2.3.0.tgz";
sha1 = "fd430e889832ec353b9acd1de217c11cb3eef873";
})
];
buildInputs =
(self.nativeDeps."commander" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "commander" ];
};
by-spec."debug"."2.0.0" =
self.by-version."debug"."2.0.0";
by-version."debug"."2.0.0" = lib.makeOverridable self.buildNodePackage {
name = "debug-2.0.0";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/debug/-/debug-2.0.0.tgz";
name = "debug-2.0.0.tgz";
sha1 = "89bd9df6732b51256bc6705342bba02ed12131ef";
})
];
buildInputs =
(self.nativeDeps."debug" or []);
deps = {
"ms-0.6.2" = self.by-version."ms"."0.6.2";
};
peerDependencies = [
];
passthru.names = [ "debug" ];
};
by-spec."diff"."1.0.8" =
self.by-version."diff"."1.0.8";
by-version."diff"."1.0.8" = lib.makeOverridable self.buildNodePackage {
name = "diff-1.0.8";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/diff/-/diff-1.0.8.tgz";
name = "diff-1.0.8.tgz";
sha1 = "343276308ec991b7bc82267ed55bc1411f971666";
})
];
buildInputs =
(self.nativeDeps."diff" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "diff" ];
};
by-spec."escape-string-regexp"."1.0.2" =
self.by-version."escape-string-regexp"."1.0.2";
by-version."escape-string-regexp"."1.0.2" = lib.makeOverridable self.buildNodePackage {
name = "escape-string-regexp-1.0.2";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz";
name = "escape-string-regexp-1.0.2.tgz";
sha1 = "4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1";
})
];
buildInputs =
(self.nativeDeps."escape-string-regexp" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "escape-string-regexp" ];
};
by-spec."expect.js"."~0.3.1" =
self.by-version."expect.js"."0.3.1";
by-version."expect.js"."0.3.1" = lib.makeOverridable self.buildNodePackage {
name = "expect.js-0.3.1";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/expect.js/-/expect.js-0.3.1.tgz";
name = "expect.js-0.3.1.tgz";
sha1 = "b0a59a0d2eff5437544ebf0ceaa6015841d09b5b";
})
];
buildInputs =
(self.nativeDeps."expect.js" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "expect.js" ];
};
"expect.js" = self.by-version."expect.js"."0.3.1";
by-spec."formatio"."~1.0" =
self.by-version."formatio"."1.0.2";
by-version."formatio"."1.0.2" = lib.makeOverridable self.buildNodePackage {
name = "formatio-1.0.2";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/formatio/-/formatio-1.0.2.tgz";
name = "formatio-1.0.2.tgz";
sha1 = "e7991ca144ff7d8cff07bb9ac86a9b79c6ba47ef";
})
];
buildInputs =
(self.nativeDeps."formatio" or []);
deps = {
"samsam-1.1.2" = self.by-version."samsam"."1.1.2";
};
peerDependencies = [
];
passthru.names = [ "formatio" ];
};
by-spec."glob"."3.2.3" =
self.by-version."glob"."3.2.3";
by-version."glob"."3.2.3" = lib.makeOverridable self.buildNodePackage {
name = "glob-3.2.3";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/glob/-/glob-3.2.3.tgz";
name = "glob-3.2.3.tgz";
sha1 = "e313eeb249c7affaa5c475286b0e115b59839467";
})
];
buildInputs =
(self.nativeDeps."glob" or []);
deps = {
"minimatch-0.2.14" = self.by-version."minimatch"."0.2.14";
"graceful-fs-2.0.3" = self.by-version."graceful-fs"."2.0.3";
"inherits-2.0.1" = self.by-version."inherits"."2.0.1";
};
peerDependencies = [
];
passthru.names = [ "glob" ];
};
by-spec."graceful-fs"."~2.0.0" =
self.by-version."graceful-fs"."2.0.3";
by-version."graceful-fs"."2.0.3" = lib.makeOverridable self.buildNodePackage {
name = "graceful-fs-2.0.3";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz";
name = "graceful-fs-2.0.3.tgz";
sha1 = "7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0";
})
];
buildInputs =
(self.nativeDeps."graceful-fs" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "graceful-fs" ];
};
by-spec."growl"."1.8.1" =
self.by-version."growl"."1.8.1";
by-version."growl"."1.8.1" = lib.makeOverridable self.buildNodePackage {
name = "growl-1.8.1";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/growl/-/growl-1.8.1.tgz";
name = "growl-1.8.1.tgz";
sha1 = "4b2dec8d907e93db336624dcec0183502f8c9428";
})
];
buildInputs =
(self.nativeDeps."growl" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "growl" ];
};
by-spec."inherits"."2" =
self.by-version."inherits"."2.0.1";
by-version."inherits"."2.0.1" = lib.makeOverridable self.buildNodePackage {
name = "inherits-2.0.1";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz";
name = "inherits-2.0.1.tgz";
sha1 = "b17d08d326b4423e568eff719f91b0b1cbdf69f1";
})
];
buildInputs =
(self.nativeDeps."inherits" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "inherits" ];
};
by-spec."inherits"."2.0.1" =
self.by-version."inherits"."2.0.1";
by-spec."jade"."0.26.3" =
self.by-version."jade"."0.26.3";
by-version."jade"."0.26.3" = lib.makeOverridable self.buildNodePackage {
name = "jade-0.26.3";
bin = true;
src = [
(fetchurl {
url = "http://registry.npmjs.org/jade/-/jade-0.26.3.tgz";
name = "jade-0.26.3.tgz";
sha1 = "8f10d7977d8d79f2f6ff862a81b0513ccb25686c";
})
];
buildInputs =
(self.nativeDeps."jade" or []);
deps = {
"commander-0.6.1" = self.by-version."commander"."0.6.1";
"mkdirp-0.3.0" = self.by-version."mkdirp"."0.3.0";
};
peerDependencies = [
];
passthru.names = [ "jade" ];
};
by-spec."lru-cache"."2" =
self.by-version."lru-cache"."2.5.0";
by-version."lru-cache"."2.5.0" = lib.makeOverridable self.buildNodePackage {
name = "lru-cache-2.5.0";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz";
name = "lru-cache-2.5.0.tgz";
sha1 = "d82388ae9c960becbea0c73bb9eb79b6c6ce9aeb";
})
];
buildInputs =
(self.nativeDeps."lru-cache" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "lru-cache" ];
};
by-spec."minimatch"."~0.2.11" =
self.by-version."minimatch"."0.2.14";
by-version."minimatch"."0.2.14" = lib.makeOverridable self.buildNodePackage {
name = "minimatch-0.2.14";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz";
name = "minimatch-0.2.14.tgz";
sha1 = "c74e780574f63c6f9a090e90efbe6ef53a6a756a";
})
];
buildInputs =
(self.nativeDeps."minimatch" or []);
deps = {
"lru-cache-2.5.0" = self.by-version."lru-cache"."2.5.0";
"sigmund-1.0.0" = self.by-version."sigmund"."1.0.0";
};
peerDependencies = [
];
passthru.names = [ "minimatch" ];
};
by-spec."minimist"."0.0.8" =
self.by-version."minimist"."0.0.8";
by-version."minimist"."0.0.8" = lib.makeOverridable self.buildNodePackage {
name = "minimist-0.0.8";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz";
name = "minimist-0.0.8.tgz";
sha1 = "857fcabfc3397d2625b8228262e86aa7a011b05d";
})
];
buildInputs =
(self.nativeDeps."minimist" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "minimist" ];
};
by-spec."mkdirp"."0.3.0" =
self.by-version."mkdirp"."0.3.0";
by-version."mkdirp"."0.3.0" = lib.makeOverridable self.buildNodePackage {
name = "mkdirp-0.3.0";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz";
name = "mkdirp-0.3.0.tgz";
sha1 = "1bbf5ab1ba827af23575143490426455f481fe1e";
})
];
buildInputs =
(self.nativeDeps."mkdirp" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "mkdirp" ];
};
by-spec."mkdirp"."0.5.0" =
self.by-version."mkdirp"."0.5.0";
by-version."mkdirp"."0.5.0" = lib.makeOverridable self.buildNodePackage {
name = "mkdirp-0.5.0";
bin = true;
src = [
(fetchurl {
url = "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz";
name = "mkdirp-0.5.0.tgz";
sha1 = "1d73076a6df986cd9344e15e71fcc05a4c9abf12";
})
];
buildInputs =
(self.nativeDeps."mkdirp" or []);
deps = {
"minimist-0.0.8" = self.by-version."minimist"."0.0.8";
};
peerDependencies = [
];
passthru.names = [ "mkdirp" ];
};
by-spec."mkdirp"."~0.3.5" =
self.by-version."mkdirp"."0.3.5";
by-version."mkdirp"."0.3.5" = lib.makeOverridable self.buildNodePackage {
name = "mkdirp-0.3.5";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz";
name = "mkdirp-0.3.5.tgz";
sha1 = "de3e5f8961c88c787ee1368df849ac4413eca8d7";
})
];
buildInputs =
(self.nativeDeps."mkdirp" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "mkdirp" ];
};
by-spec."mocha"."~1.21.0" =
self.by-version."mocha"."1.21.5";
by-version."mocha"."1.21.5" = lib.makeOverridable self.buildNodePackage {
name = "mocha-1.21.5";
bin = true;
src = [
(fetchurl {
url = "http://registry.npmjs.org/mocha/-/mocha-1.21.5.tgz";
name = "mocha-1.21.5.tgz";
sha1 = "7c58b09174df976e434a23b1e8d639873fc529e9";
})
];
buildInputs =
(self.nativeDeps."mocha" or []);
deps = {
"commander-2.3.0" = self.by-version."commander"."2.3.0";
"debug-2.0.0" = self.by-version."debug"."2.0.0";
"diff-1.0.8" = self.by-version."diff"."1.0.8";
"escape-string-regexp-1.0.2" = self.by-version."escape-string-regexp"."1.0.2";
"glob-3.2.3" = self.by-version."glob"."3.2.3";
"growl-1.8.1" = self.by-version."growl"."1.8.1";
"jade-0.26.3" = self.by-version."jade"."0.26.3";
"mkdirp-0.5.0" = self.by-version."mkdirp"."0.5.0";
};
peerDependencies = [
];
passthru.names = [ "mocha" ];
};
"mocha" = self.by-version."mocha"."1.21.5";
by-spec."ms"."0.6.2" =
self.by-version."ms"."0.6.2";
by-version."ms"."0.6.2" = lib.makeOverridable self.buildNodePackage {
name = "ms-0.6.2";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/ms/-/ms-0.6.2.tgz";
name = "ms-0.6.2.tgz";
sha1 = "d89c2124c6fdc1353d65a8b77bf1aac4b193708c";
})
];
buildInputs =
(self.nativeDeps."ms" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "ms" ];
};
by-spec."nedb"."~1.0.0" =
self.by-version."nedb"."1.0.2";
by-version."nedb"."1.0.2" = lib.makeOverridable self.buildNodePackage {
name = "nedb-1.0.2";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/nedb/-/nedb-1.0.2.tgz";
name = "nedb-1.0.2.tgz";
sha1 = "309f10ba29f2002f74a92fb870b8a53ba2131593";
})
];
buildInputs =
(self.nativeDeps."nedb" or []);
deps = {
"async-0.2.10" = self.by-version."async"."0.2.10";
"underscore-1.4.4" = self.by-version."underscore"."1.4.4";
"binary-search-tree-0.2.4" = self.by-version."binary-search-tree"."0.2.4";
"mkdirp-0.3.5" = self.by-version."mkdirp"."0.3.5";
};
peerDependencies = [
];
passthru.names = [ "nedb" ];
};
"nedb" = self.by-version."nedb"."1.0.2";
by-spec."samsam"."~1.1" =
self.by-version."samsam"."1.1.2";
by-version."samsam"."1.1.2" = lib.makeOverridable self.buildNodePackage {
name = "samsam-1.1.2";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz";
name = "samsam-1.1.2.tgz";
sha1 = "bec11fdc83a9fda063401210e40176c3024d1567";
})
];
buildInputs =
(self.nativeDeps."samsam" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "samsam" ];
};
by-spec."sigmund"."~1.0.0" =
self.by-version."sigmund"."1.0.0";
by-version."sigmund"."1.0.0" = lib.makeOverridable self.buildNodePackage {
name = "sigmund-1.0.0";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz";
name = "sigmund-1.0.0.tgz";
sha1 = "66a2b3a749ae8b5fb89efd4fcc01dc94fbe02296";
})
];
buildInputs =
(self.nativeDeps."sigmund" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "sigmund" ];
};
by-spec."sinon"."~1.10.3" =
self.by-version."sinon"."1.10.3";
by-version."sinon"."1.10.3" = lib.makeOverridable self.buildNodePackage {
name = "sinon-1.10.3";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/sinon/-/sinon-1.10.3.tgz";
name = "sinon-1.10.3.tgz";
sha1 = "c063e0e99d8327dc199113aab52eb83a2e9e3c2c";
})
];
buildInputs =
(self.nativeDeps."sinon" or []);
deps = {
"formatio-1.0.2" = self.by-version."formatio"."1.0.2";
"util-0.10.3" = self.by-version."util"."0.10.3";
};
peerDependencies = [
];
passthru.names = [ "sinon" ];
};
"sinon" = self.by-version."sinon"."1.10.3";
by-spec."underscore"."^1.6.0" =
self.by-version."underscore"."1.7.0";
by-version."underscore"."1.7.0" = lib.makeOverridable self.buildNodePackage {
name = "underscore-1.7.0";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz";
name = "underscore-1.7.0.tgz";
sha1 = "6bbaf0877500d36be34ecaa584e0db9fef035209";
})
];
buildInputs =
(self.nativeDeps."underscore" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "underscore" ];
};
"underscore" = self.by-version."underscore"."1.7.0";
by-spec."underscore"."~1.4.4" =
self.by-version."underscore"."1.4.4";
by-version."underscore"."1.4.4" = lib.makeOverridable self.buildNodePackage {
name = "underscore-1.4.4";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz";
name = "underscore-1.4.4.tgz";
sha1 = "61a6a32010622afa07963bf325203cf12239d604";
})
];
buildInputs =
(self.nativeDeps."underscore" or []);
deps = {
};
peerDependencies = [
];
passthru.names = [ "underscore" ];
};
by-spec."util".">=0.10.3 <1" =
self.by-version."util"."0.10.3";
by-version."util"."0.10.3" = lib.makeOverridable self.buildNodePackage {
name = "util-0.10.3";
bin = false;
src = [
(fetchurl {
url = "http://registry.npmjs.org/util/-/util-0.10.3.tgz";
name = "util-0.10.3.tgz";
sha1 = "7afb1afe50805246489e3db7fe0ed379336ac0f9";
})
];
buildInputs =
(self.nativeDeps."util" or []);
deps = {
"inherits-2.0.1" = self.by-version."inherits"."2.0.1";
};
peerDependencies = [
];
passthru.names = [ "util" ];
};
}

View File

@ -12893,6 +12893,8 @@ let
nixopsUnstable = callPackage ../tools/package-management/nixops/unstable.nix { };
nixui = callPackage ../tools/package-management/nixui { node_webkit = node_webkit_0_11; };
nix-prefetch-scripts = callPackage ../tools/package-management/nix-prefetch-scripts { };
nix-repl = callPackage ../tools/package-management/nix-repl { };