Add nixos-gui among the installer tools.
Add it as a default for the graphical profile. svn path=/nixos/trunk/; revision=26960
This commit is contained in:
parent
97b39bd17c
commit
921231b555
17
gui/README
17
gui/README
@ -1,19 +1,16 @@
|
|||||||
This file should become a nix expression.
|
This file should become a nix expression. (see modules/installer/tools/tools.nix)
|
||||||
|
|
||||||
you need to:
|
you need to:
|
||||||
- download the latest jQuery from:
|
- download the latest jQuery from and copy it to chrome/content:
|
||||||
http://jqueryjs.googlecode.com/files/jquery-1.3.2.js
|
http://code.jquery.com/jquery-1.5.2.js
|
||||||
SHA1 Checksum: f0b95e99225f314fbe37ccf6b74ce2f916c517de
|
|
||||||
|
|
||||||
- install 'xulrunner' with nix:
|
- install 'xulrunner' with nix:
|
||||||
nix-env -i xulrunner
|
nix-env -Ai nixpkgs_sys.firefox40Pkgs.xulrunner
|
||||||
|
|
||||||
- install and add nix-intantiate in your path
|
- make sure nixos-option in your path
|
||||||
|
|
||||||
- have /etc/nixos/nixpkgs
|
- have /etc/nixos/nixpkgs
|
||||||
- have /etc/nixos/nixos
|
- have /etc/nixos/nixos
|
||||||
|
|
||||||
|
run it:
|
||||||
to run it, either:
|
- xulrunner /etc/nixos/nixos/gui/application.ini -jsconsole
|
||||||
- cd /etc/nixos/nixos/gui; ./nixos-gui
|
|
||||||
- xulrunner /etc/nixos/nixos/gui/application.ini
|
|
||||||
|
@ -8,15 +8,16 @@ Vendor=NixOS
|
|||||||
Name=NixOS-gui
|
Name=NixOS-gui
|
||||||
;
|
;
|
||||||
; This field specifies your application's version. This field is optional.
|
; This field specifies your application's version. This field is optional.
|
||||||
Version=0.0
|
Version=0.1
|
||||||
;
|
;
|
||||||
; This field specifies your application's build ID (timestamp). This field is
|
; This field specifies your application's build ID (timestamp). This field is
|
||||||
; required.
|
; required.
|
||||||
BuildID=20090925
|
BuildID=20110424
|
||||||
;
|
;
|
||||||
; This field specifies a compact copyright notice for your application. This
|
; This field specifies a compact copyright notice for your application. This
|
||||||
; field is optional.
|
; field is optional.
|
||||||
;Copyright=
|
;Copyright=
|
||||||
|
|
||||||
;
|
;
|
||||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec xulrunner "./application.ini"
|
|
@ -1,10 +1,11 @@
|
|||||||
# This module generates nixos-install, nixos-rebuild,
|
# This module generates nixos-install, nixos-rebuild,
|
||||||
# nixos-hardware-scan, etc.
|
# nixos-hardware-scan, etc.
|
||||||
|
|
||||||
{config, pkgs, ...}:
|
{config, pkgs, modulesPath, ...}:
|
||||||
|
|
||||||
let
|
let
|
||||||
### implementation
|
### implementation
|
||||||
|
cfg = config.installer;
|
||||||
|
|
||||||
makeProg = args: pkgs.substituteAll (args // {
|
makeProg = args: pkgs.substituteAll (args // {
|
||||||
dir = "bin";
|
dir = "bin";
|
||||||
@ -27,7 +28,7 @@ let
|
|||||||
|
|
||||||
inherit (pkgs) perl pathsFromGraph;
|
inherit (pkgs) perl pathsFromGraph;
|
||||||
nix = config.environment.nix;
|
nix = config.environment.nix;
|
||||||
nixpkgsURL = config.installer.nixpkgsURL;
|
nixpkgsURL = cfg.nixpkgsURL;
|
||||||
|
|
||||||
nixClosure = pkgs.runCommand "closure"
|
nixClosure = pkgs.runCommand "closure"
|
||||||
{exportReferencesGraph = ["refs" config.environment.nix];}
|
{exportReferencesGraph = ["refs" config.environment.nix];}
|
||||||
@ -64,7 +65,7 @@ let
|
|||||||
inherit nixClosure nix;
|
inherit nixClosure nix;
|
||||||
|
|
||||||
# TODO shell ?
|
# TODO shell ?
|
||||||
nixpkgsURL = config.installer.nixpkgsURL;
|
nixpkgsURL = cfg.nixpkgsURL;
|
||||||
};
|
};
|
||||||
|
|
||||||
# see ./nixos-bootstrap-archive/README-BOOTSTRAP-NIXOS
|
# see ./nixos-bootstrap-archive/README-BOOTSTRAP-NIXOS
|
||||||
@ -90,7 +91,7 @@ let
|
|||||||
name = "nixos-hardware-scan";
|
name = "nixos-hardware-scan";
|
||||||
src = ./nixos-hardware-scan.pl;
|
src = ./nixos-hardware-scan.pl;
|
||||||
inherit (pkgs) perl;
|
inherit (pkgs) perl;
|
||||||
profile = config.installer.installProfile;
|
profile = cfg.installProfile;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosOption = makeProg {
|
nixosOption = makeProg {
|
||||||
@ -98,6 +99,23 @@ let
|
|||||||
src = ./nixos-option.sh;
|
src = ./nixos-option.sh;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosGui = pkgs.xulrunnerWrapper {
|
||||||
|
launcher = "nixos-gui";
|
||||||
|
application = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "nixos-gui";
|
||||||
|
buildCommand = ''
|
||||||
|
ensureDir $out
|
||||||
|
cp -r $source $out
|
||||||
|
cp $jquery $out/chrome/content/jquery-1.5.2.js
|
||||||
|
'';
|
||||||
|
sources = pkgs.lib.cleanSource "${modulesPath}/../gui";
|
||||||
|
jquery = pkgs.fetchurl {
|
||||||
|
url = http://code.jquery.com/jquery-1.5.2.min.js;
|
||||||
|
sha256 = "e2107c8ecdb479c36d822d82bda2a8caf4429ab2d2cf9f20d5c931f75275403c";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -132,6 +150,15 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
installer.enableGraphicalTools = pkgs.lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = with pkgs.lib.types; bool;
|
||||||
|
example = true;
|
||||||
|
description = ''
|
||||||
|
Enable the installation of graphical tools.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -146,7 +173,7 @@ in
|
|||||||
|
|
||||||
installer2.runInChroot
|
installer2.runInChroot
|
||||||
installer2.nixosPrepareInstall
|
installer2.nixosPrepareInstall
|
||||||
];
|
] ++ pkgs.lib.optional cfg.enableGraphicalTools nixosGui;
|
||||||
|
|
||||||
system.build = {
|
system.build = {
|
||||||
inherit nixosInstall nixosHardwareScan nixosOption;
|
inherit nixosInstall nixosHardwareScan nixosOption;
|
||||||
|
@ -13,4 +13,6 @@
|
|||||||
desktopManager.default = "kde4";
|
desktopManager.default = "kde4";
|
||||||
desktopManager.kde4.enable = true;
|
desktopManager.kde4.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
installer.enableGraphicalTools = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user