From 4cf1dfeef28e3571eac3e8a4495347f778e9c0a5 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 30 Sep 2018 01:25:06 +0200 Subject: ma pkgs._4nxci: re-package 4nxci's version of mbedtls --- makefu/5pkgs/4nxci/default.nix | 52 ----------------------------------------- makefu/5pkgs/_4nxci/default.nix | 50 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 52 deletions(-) delete mode 100644 makefu/5pkgs/4nxci/default.nix create mode 100644 makefu/5pkgs/_4nxci/default.nix (limited to 'makefu') diff --git a/makefu/5pkgs/4nxci/default.nix b/makefu/5pkgs/4nxci/default.nix deleted file mode 100644 index 3aba3be45..000000000 --- a/makefu/5pkgs/4nxci/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, mbedtls, python2 }: -let - - mymbedtls = lib.overrideDerivation mbedtls (old: rec { - name = "mbedtls-${version}"; - version = "2.13.0"; - src = fetchFromGitHub { - owner = "ARMmbed"; - repo = "mbedtls"; - rev = name; - sha256 = "1257kp7yxkwwbx5v14kmrmgk1f9zagiddg5alm4wbj0pmgbrm14j"; - }; - buildInputs = old.buildInputs ++ [ python2 ]; - postConfigure = '' - perl scripts/config.pl set MBEDTLS_CMAC_C - ''; - doCheck = false; - - }); -in stdenv.mkDerivation rec { - name = "4nxci-${version}"; - version = "1.30"; - - src = fetchFromGitHub { - owner = "The-4n"; - repo = "4NXCI"; - rev = "v${version}"; - sha256 = "0nrd19z88iahxcdx468lzgxlvkl65smwx8f9s19431cszyhvpxyh"; - }; - - buildPhase = '' - cp config.mk.template config.mk - sed -i 's#\(INCLUDE =\).*#\1${mymbedtls}/include#' Makefile - sed -i 's#\(LIBDIR =\).*#\1${mymbedtls}/lib#' Makefile - make 4nxci - ''; - - installPhase = '' - install -m755 -D 4nxci $out/bin/4nxci - ''; - - #preInstall = '' - # mkdir -p $out/bin - #''; - - buildInputs = [ mymbedtls ]; - - meta = { - description = "convert xci to nsp"; - license = lib.licenses.isc; - }; -} diff --git a/makefu/5pkgs/_4nxci/default.nix b/makefu/5pkgs/_4nxci/default.nix new file mode 100644 index 000000000..dafa37ff6 --- /dev/null +++ b/makefu/5pkgs/_4nxci/default.nix @@ -0,0 +1,50 @@ +{ stdenv, lib, fetchFromGitHub, mbedtls, python2, perl }: +let + version = "1.35"; + src = fetchFromGitHub { + owner = "The-4n"; + repo = "4NXCI"; + rev = "v${version}"; + sha256 = "0yq0irxzi4wi71ajw8ld01zfpkrgknpq7g3m76pbnwmdzkm7dra6"; + }; + + mymbedtls = stdenv.mkDerivation { + name = "mbedtls-${version}"; + version = "2.6.1"; + doCheck = false; + inherit src; + buildInputs = [ perl ]; + phases = [ "unpackPhase" "buildPhase" "installPhase" ]; + makeFlags = [ "DESTDIR=$(out)" ]; + buildPhase = '' + cp config.mk.template config.mk + cd mbedtls + make + ''; + }; +in stdenv.mkDerivation rec { + name = "4nxci-${version}"; + + inherit src version; + buildPhase = '' + cp config.mk.template config.mk + sed -i 's#\(INCLUDE =\).*#\1${mymbedtls}/include#' Makefile + sed -i 's#\(LIBDIR =\).*#\1${mymbedtls}/lib#' Makefile + make 4nxci + ''; + + installPhase = '' + install -m755 -D 4nxci $out/bin/4nxci + ''; + + #preInstall = '' + # mkdir -p $out/bin + #''; + + buildInputs = [ mymbedtls ]; + + meta = { + description = "convert xci to nsp"; + license = lib.licenses.isc; + }; +} -- cgit v1.2.3