Author: NicolasPierron Date: Mon Apr 25 01:03:57 2011 New Revision: 26960 URL: https://svn.nixos.org/websvn/nix/?rev=26960&sc=1
Log: Add nixos-gui among the installer tools. Add it as a default for the graphical profile. Deleted: nixos/trunk/gui/nixos-gui Modified: nixos/trunk/gui/README nixos/trunk/gui/application.ini nixos/trunk/modules/installer/tools/tools.nix nixos/trunk/modules/profiles/graphical.nix Modified: nixos/trunk/gui/README ============================================================================== --- nixos/trunk/gui/README Sun Apr 24 20:13:14 2011 (r26959) +++ nixos/trunk/gui/README Mon Apr 25 01:03:57 2011 (r26960) @@ -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: -- download the latest jQuery from: - http://jqueryjs.googlecode.com/files/jquery-1.3.2.js - SHA1 Checksum: f0b95e99225f314fbe37ccf6b74ce2f916c517de +- download the latest jQuery from and copy it to chrome/content: + http://code.jquery.com/jquery-1.5.2.js - 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/nixos - -to run it, either: -- cd /etc/nixos/nixos/gui; ./nixos-gui -- xulrunner /etc/nixos/nixos/gui/application.ini +run it: +- xulrunner /etc/nixos/nixos/gui/application.ini -jsconsole Modified: nixos/trunk/gui/application.ini ============================================================================== --- nixos/trunk/gui/application.ini Sun Apr 24 20:13:14 2011 (r26959) +++ nixos/trunk/gui/application.ini Mon Apr 25 01:03:57 2011 (r26960) @@ -8,15 +8,16 @@ Name=NixOS-gui ; ; 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 ; required. -BuildID=20090925 +BuildID=20110424 ; ; This field specifies a compact copyright notice for your application. This ; field is optional. ;Copyright= + ; ; 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 Modified: nixos/trunk/modules/installer/tools/tools.nix ============================================================================== --- nixos/trunk/modules/installer/tools/tools.nix Sun Apr 24 20:13:14 2011 (r26959) +++ nixos/trunk/modules/installer/tools/tools.nix Mon Apr 25 01:03:57 2011 (r26960) @@ -1,33 +1,34 @@ # This module generates nixos-install, nixos-rebuild, # nixos-hardware-scan, etc. -{config, pkgs, ...}: +{config, pkgs, modulesPath, ...}: let ### implementation + cfg = config.installer; makeProg = args: pkgs.substituteAll (args // { dir = "bin"; isExecutable = true; }); - + nixosBuildVMS = makeProg { name = "nixos-build-vms"; src = ./nixos-build-vms/nixos-build-vms.sh; }; - + nixosDeployNetwork = makeProg { name = "nixos-deploy-network"; src = ./nixos-deploy-network/nixos-deploy-network.sh; }; - + nixosInstall = makeProg { name = "nixos-install"; src = ./nixos-install.sh; inherit (pkgs) perl pathsFromGraph; nix = config.environment.nix; - nixpkgsURL = config.installer.nixpkgsURL; + nixpkgsURL = cfg.nixpkgsURL; nixClosure = pkgs.runCommand "closure" {exportReferencesGraph = ["refs" config.environment.nix];} @@ -64,7 +65,7 @@ inherit nixClosure nix; # TODO shell ? - nixpkgsURL = config.installer.nixpkgsURL; + nixpkgsURL = cfg.nixpkgsURL; }; # see ./nixos-bootstrap-archive/README-BOOTSTRAP-NIXOS @@ -90,7 +91,7 @@ name = "nixos-hardware-scan"; src = ./nixos-hardware-scan.pl; inherit (pkgs) perl; - profile = config.installer.installProfile; + profile = cfg.installProfile; }; nixosOption = makeProg { @@ -98,11 +99,28 @@ 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 { options = { - + installer.nixpkgsURL = pkgs.lib.mkOption { default = ""; example = http://nixos.org/releases/nix/nixpkgs-0.11pre7577; @@ -131,7 +149,16 @@ Name of the profile used when generating the hardware-scan. ''; }; - + + installer.enableGraphicalTools = pkgs.lib.mkOption { + default = false; + type = with pkgs.lib.types; bool; + example = true; + description = '' + Enable the installation of graphical tools. + ''; + }; + }; config = { @@ -146,7 +173,7 @@ installer2.runInChroot installer2.nixosPrepareInstall - ]; + ] ++ pkgs.lib.optional cfg.enableGraphicalTools nixosGui; system.build = { inherit nixosInstall nixosHardwareScan nixosOption; Modified: nixos/trunk/modules/profiles/graphical.nix ============================================================================== --- nixos/trunk/modules/profiles/graphical.nix Sun Apr 24 20:13:14 2011 (r26959) +++ nixos/trunk/modules/profiles/graphical.nix Mon Apr 25 01:03:57 2011 (r26960) @@ -13,4 +13,6 @@ desktopManager.default = "kde4"; desktopManager.kde4.enable = true; }; + + installer.enableGraphicalTools = true; } _______________________________________________ nix-commits mailing list nix-comm...@cs.uu.nl http://mail.cs.uu.nl/mailman/listinfo/nix-commits