summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2011-08-29 10:16:36 +0000
committerMichael Raskin <7c6f434c@mail.ru>2011-08-29 10:16:36 +0000
commit04e84c2c1384c5b97290ca38f713c3921e6fe60d (patch)
treeeca653e3069fe4f9e1d67e708a7b62f66d32371b /pkgs/tools
parentf9728ee0dbba7683ad7619a93f901b309cf25d57 (diff)
downloadnixlib-04e84c2c1384c5b97290ca38f713c3921e6fe60d.tar
nixlib-04e84c2c1384c5b97290ca38f713c3921e6fe60d.tar.gz
nixlib-04e84c2c1384c5b97290ca38f713c3921e6fe60d.tar.bz2
nixlib-04e84c2c1384c5b97290ca38f713c3921e6fe60d.tar.lz
nixlib-04e84c2c1384c5b97290ca38f713c3921e6fe60d.tar.xz
nixlib-04e84c2c1384c5b97290ca38f713c3921e6fe60d.tar.zst
nixlib-04e84c2c1384c5b97290ca38f713c3921e6fe60d.zip
Adding netboot
svn path=/nixpkgs/trunk/; revision=28872
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/netboot/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/tools/networking/netboot/default.nix b/pkgs/tools/networking/netboot/default.nix
new file mode 100644
index 000000000000..3a191c6ef342
--- /dev/null
+++ b/pkgs/tools/networking/netboot/default.nix
@@ -0,0 +1,59 @@
+x@{builderDefsPackage
+  , fetchgit, ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    ["fetchgit"];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="netboot";
+    rev="19a955cd87b399a5b56";
+    name="${baseName}-git-head";
+    url="git://github.com/ITikhonov/netboot.git";
+    hash="7610c734dc46183439c161d327e7ef6a3d5bc07b5173850b92f71ec047b109d6";
+  };
+in
+rec {
+  srcDrv = a.fetchgit {
+    url = sourceInfo.url;
+    sha256 = sourceInfo.hash;
+    rev = sourceInfo.rev;
+  };
+
+  src=srcDrv + "/";
+
+  inherit (sourceInfo) name version;
+  inherit buildInputs;
+
+  /* doConfigure should be removed if not needed */
+  phaseNames = ["doBuild" "doDeploy"];
+
+  doBuild = a.fullDepEntry ''
+    gcc netboot.c -o netboot
+  '' ["doUnpack" "addInputs"];
+
+  doDeploy = a.fullDepEntry ''
+    ensureDir "$out/bin"
+    cp netboot "$out/bin"
+  '' ["defEnsureDir" "minInit"];
+      
+  meta = {
+    description = "Mini PXE server";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+    license = "free-noncopyleft";
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "https://github.com/ITikhonov/netboot";
+    };
+  };
+}) x
+