From 26e60fca6e9f7837fa6fde4cb6f300284dd83e0e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Dec 2021 22:37:32 +0800 Subject: [PATCH] flake: cleanup tarball unpacking --- flake.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 0b8e61d89..87e5ce6ab 100644 --- a/flake.nix +++ b/flake.nix @@ -19,11 +19,17 @@ url = "https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-python-3.9.7-4-any.pkg.tar.zst"; sha256 = "0iwlgbk4b457yn9djwqswid55xhyyi35qymz1lfh42xwdpxdm47c"; }; - msys2-python = pkgs.runCommand "msys2-python" { buildInputs = [ pkgs.gnutar pkgs.zstd ]; } - '' - mkdir $out - tar xvf ${msys2-python-tar} -C $out - ''; + msys2-python = pkgs.stdenvNoCC.mkDerivation { + name = "msys2-python"; + src = msys2-python-tar; + buildInputs = [ pkgs.gnutar pkgs.zstd ]; + phases = [ "installPhase" ]; + installPhase = + '' + mkdir $out + tar xf $src -C $out + ''; + }; pyo3-mingw-config = pkgs.writeTextFile { name = "pyo3-mingw-config"; text =