mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 02:42:59 +00:00
ddrescue: modernize and fix cross (hopefully)
Carefully do not add attributes for cross unless in cross, to avoid hash breakage
This commit is contained in:
parent
bef622a4e8
commit
be3f18d79e
@ -1,4 +1,9 @@
|
||||
{ stdenv, fetchurl, lzip }:
|
||||
{ stdenv
|
||||
, fetchurl, lzip
|
||||
, hostPlatform, buildPlatform
|
||||
}:
|
||||
|
||||
let inherit (stdenv.lib) optionals; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ddrescue-1.22";
|
||||
@ -10,7 +15,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ lzip ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = hostPlatform == buildPlatform;
|
||||
|
||||
${if hostPlatform != buildPlatform then "crossPlatforms" else null} = [ ];
|
||||
${if hostPlatform != buildPlatform then "configureFlags" else null} = [
|
||||
"CXX=${stdenv.cc.prefix}c++"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GNU ddrescue, a data recovery tool";
|
||||
|
Loading…
Reference in New Issue
Block a user