git.iko.soy/typeable/nixpkgs
on master help sign in
ddrescue: modernize and fix cross (hopefully)

Carefully do not add attributes for cross unless in cross, to avoid hash breakage

commitbe3f18d79e2d232c2cbd2a394c34476af8413f0a authorRoss MacLeod <rmm-github@z.odi.ac> dateSun 4 Jun 2017, 21:50 (9 years ago) parentbef622a
1 file changed+12−2
pkgs/tools/system/ddrescue/default.nix+12−2
pkgs/tools/system/ddrescue/default.nix+12−2
@@ -1,4 +1,9 @@
1−{ stdenv, fetchurl, lzip }:
1+{ stdenv
2+, fetchurl, lzip
3+, hostPlatform, buildPlatform
4+}:
5+
6+let inherit (stdenv.lib) optionals; in
27
38stdenv.mkDerivation rec {
49 name = "ddrescue-1.22";
@@ -10,7 +15,12 @@ stdenv.mkDerivation rec {
1015
1116 nativeBuildInputs = [ lzip ];
1217
13− doCheck = true;
18+ doCheck = hostPlatform == buildPlatform;
19+
20+ ${if hostPlatform != buildPlatform then "crossPlatforms" else null} = [ ];
21+ ${if hostPlatform != buildPlatform then "configureFlags" else null} = [
22+ "CXX=${stdenv.cc.prefix}c++"
23+ ];
1424
1525 meta = with stdenv.lib; {
1626 description = "GNU ddrescue, a data recovery tool";