From b4b61eccce787a3fa2a1a740e50bf4cdbff3ecef Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Sun, 20 Jan 2008 22:47:08 +0000 Subject: [PATCH] svn path=/nixpkgs/trunk/; revision=10233 --- pkgs/applications/editors/bvi/default.nix | 17 ++++++++ pkgs/lib/strings-with-deps2.nix | 47 ----------------------- pkgs/top-level/all-packages.nix | 8 ++-- 3 files changed, 21 insertions(+), 51 deletions(-) create mode 100644 pkgs/applications/editors/bvi/default.nix delete mode 100644 pkgs/lib/strings-with-deps2.nix diff --git a/pkgs/applications/editors/bvi/default.nix b/pkgs/applications/editors/bvi/default.nix new file mode 100644 index 00000000000..6d9ffdaecc8 --- /dev/null +++ b/pkgs/applications/editors/bvi/default.nix @@ -0,0 +1,17 @@ +args: +args.stdenv.mkDerivation { + name = "bvi-1.3.2"; + + src = args.fetchurl { + url = http://prdownloads.sourceforge.net/bvi/bvi-1.3.2.src.tar.gz; + sha256 = "110wxqnyianqamxq4y53drqqxb9vp4k2fcvic45qggvlqkqhlfgz"; + }; + + buildInputs =(with args; [ncurses]); + + meta = { + description = "hex editor with vim style keybindings"; + homepage = http://bvi.sourceforge.net/download.html; + license = "GPL2"; + }; +} diff --git a/pkgs/lib/strings-with-deps2.nix b/pkgs/lib/strings-with-deps2.nix deleted file mode 100644 index 85c3526ee22..00000000000 --- a/pkgs/lib/strings-with-deps2.nix +++ /dev/null @@ -1,47 +0,0 @@ -/* propoal Marc Weber (original idea and implementation: Michael Raskin) - This should not be a complete rewrite of Michael Raskins code. - I only fear having to override one step.. - (which could be done using textClosureMap = f: .. and telling f to substitute a text string) - But I don't like this solution - - I've rewritten the part creating the actual step hoping that it's easier to understand. - - Baisc idea keeps the same: assemble a custom builder script by concatenating - text snippets with dependencies. - - Difference: Instead of concatenating the text snippets only aliases are concatenated [1] - Then those alias names are looked up from an attribute set [2] - (this way giving you full control overriding steps) - - All script snippets written by Michael Raskin will be reused thankfully :) -*/ - -/* Example: -setup = { - name = "setup"; - value = "echo setup"; # the text snippet (by calling it value it fits the attr name expected by listToAttrs -} - -unpack = { - name = "unpack"; - value = "tar xf ... "; - dependencies = [ "setup" ]; # createScript ensures that these are prependend to this text snipped -} - -script = createScript { steps = [setup unpack] } -is equal to -script = createScript { steps = [unpack] } - -# overriding example: -script_overridden_setup = createScript { steps = [unpack]; override = { setup = "overridden setup"; }; }; -*/ -lib : -let inherit (builtins) listToAttrs; - inherit (lib) intersperse concatLists uniqList concatStrings; - in { - createScript = { steps, override ? {} } : let - addNameToDeps = r : ( if (r ? dependencies) then r.dependencies else [] ) ++ [r.name]; - names = uniqList { inputList = concatLists ( map addNameToDeps steps ) ; }; # [1] - scriptsAsAttrs = listToAttrs steps; # [2] - in concatStrings ( intersperse "\n" (map (x : __getAttr x (scriptsAsAttrs // override ) ) names) ); - } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index faca8a7f320..8230083875c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -229,10 +229,6 @@ rec { inherit stdenv lib; }; - builderDefs2 = lib.sumArgs ((import ./builder-defs2.nix) (builderDefs null)); - - stringsWithDeps2 = (import ../lib/strings-with-deps2.nix) lib; - # Call a specific version of a Nix expression, that is, # `selectVersion ./foo {version = "0.1.2"; args...}' evaluates to # `import ./foo/0.1.2.nix args'. @@ -3876,6 +3872,10 @@ rec { inherit fetchurl stdenv pkgconfig bmp; }; + bvi = import ../applications/editors/bvi { + inherit fetchurl stdenv ncurses; + }; + cdparanoiaIII = import ../applications/audio/cdparanoia { inherit fetchurl stdenv; };