From 33e42bdd8e427f759a9127c11f71bec0bfe3290a Mon Sep 17 00:00:00 2001 From: LluĂ­s Batlle i Rossell Date: Wed, 28 Mar 2012 20:18:56 +0000 Subject: Removing usernixos from nixpkgs trunk. I placed a repository starting at this same svn content removed at: http://viric.name/cgi-bin/usernixos svn path=/nixpkgs/trunk/; revision=33459 --- pkgs/build-support/usernixos/activation.nix | 26 ------------ pkgs/build-support/usernixos/bashrc.nix | 59 ---------------------------- pkgs/build-support/usernixos/eval-config.nix | 31 --------------- pkgs/build-support/usernixos/module-list.nix | 4 -- pkgs/top-level/all-packages.nix | 10 ----- 5 files changed, 130 deletions(-) delete mode 100644 pkgs/build-support/usernixos/activation.nix delete mode 100644 pkgs/build-support/usernixos/bashrc.nix delete mode 100644 pkgs/build-support/usernixos/eval-config.nix delete mode 100644 pkgs/build-support/usernixos/module-list.nix diff --git a/pkgs/build-support/usernixos/activation.nix b/pkgs/build-support/usernixos/activation.nix deleted file mode 100644 index 2e3f0af2bf778..0000000000000 --- a/pkgs/build-support/usernixos/activation.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pkgs, config, ... }: - -let - script = pkgs.writeScriptBin "usernixos" ('' - #!${pkgs.bash}/bin/bash - '' + config.activationContents); -in -with pkgs.lib; -{ - options = { - activation = mkOption { - default = {}; - }; - - activationContents = mkOption { - default = ""; - internal = true; - merge = concatStringsSep "\n"; - description = '' - Commands to run at activation - ''; - }; - }; - - config.activation.toplevel = script; -} diff --git a/pkgs/build-support/usernixos/bashrc.nix b/pkgs/build-support/usernixos/bashrc.nix deleted file mode 100644 index 1860f4b2e89cb..0000000000000 --- a/pkgs/build-support/usernixos/bashrc.nix +++ /dev/null @@ -1,59 +0,0 @@ -# Generator for .bashrc -{pkgs, config, ...}: - -with pkgs.lib; - -let - bashrcFile = pkgs.writeScript "bashrc" config.bashrc.contents; - cfg = config.bashrc; -in -{ - options = { - environment.editor = mkOption { - default = "${pkgs.vim}/bin/vim"; - type = types.string; - description = '' - Editor - ''; - }; - - bashrc = { - enable = mkOption { - default = false; - type = types.bool; - description = '' - Enable of .bashrc generation on activation - ''; - }; - - destination = mkOption { - default = "~/.bashrc"; - type = types.string; - description = '' - The symlink that will point to the generated bashrc at activation time - ''; - }; - - contents = mkOption { - default = ""; - type = types.string; - merge = concatStringsSep "\n"; - description = '' - Enable of .bashrc generation on activation - ''; - }; - }; - }; - - config.bashrc.contents = '' - export EDITOR="${config.environment.editor}" - ''; - - config.activationContents = mkIf cfg.enable '' - if [ -e "${cfg.destination}" ]; then - echo Cannot set "${cfg.destination}", it exists - exit 1 - fi - ln -sf ${bashrcFile} "${cfg.destination}" - ''; -} diff --git a/pkgs/build-support/usernixos/eval-config.nix b/pkgs/build-support/usernixos/eval-config.nix deleted file mode 100644 index 300ddd2444e52..0000000000000 --- a/pkgs/build-support/usernixos/eval-config.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ system ? builtins.currentSystem -, pkgs ? null -, baseModules ? import ./module-list.nix -, extraArgs ? {} -, modules -}: - -let extraArgs_ = extraArgs; pkgs_ = pkgs; system_ = system; in - -rec { - - # These are the NixOS modules that constitute the system configuration. - configComponents = modules ++ baseModules; - - # Merge the option definitions in all modules, forming the full - # system configuration. It's not checked for undeclared options. - systemModule = - pkgs.lib.fixMergeModules configComponents extraArgs; - - optionDefinitions = systemModule.config; - optionDeclarations = systemModule.options; - inherit (systemModule) options; - - # These are the extra arguments passed to every module. In - # particular, Nixpkgs is passed through the "pkgs" argument. - extraArgs = extraArgs_ // { - inherit pkgs modules baseModules; - }; - - config = systemModule.config; -} diff --git a/pkgs/build-support/usernixos/module-list.nix b/pkgs/build-support/usernixos/module-list.nix deleted file mode 100644 index 2aa5329940bd4..0000000000000 --- a/pkgs/build-support/usernixos/module-list.nix +++ /dev/null @@ -1,4 +0,0 @@ -[ - ./activation.nix - ./bashrc.nix -] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75cc533de9ae3..51c540deb1dce 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -353,16 +353,6 @@ let inherit pkgs lib; }; - usernixos = let - configmodule = getConfig [ "usernixos" ] null; - eval = (import ../build-support/usernixos/eval-config.nix) { - inherit pkgs system; - modules = [ configmodule ]; - }; - in - assert configmodule != null; - eval.config.activation.toplevel; - platforms = import ./platforms.nix; -- cgit 1.4.1