e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ stdenv, mkDerivation, lib, fetchurl, cmake, pkg-config, makeWrapper
|
|
, httrack, qtbase, qtmultimedia }:
|
|
|
|
mkDerivation rec {
|
|
pname = "httraqt";
|
|
version = "1.4.9";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/httraqt/${pname}-${version}.tar.gz";
|
|
sha256 = "0pjxqnqchpbla4xiq4rklc06484n46cpahnjy03n9rghwwcad25b";
|
|
};
|
|
|
|
buildInputs = [ httrack qtbase qtmultimedia ];
|
|
|
|
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
|
|
|
|
prePatch = ''
|
|
substituteInPlace cmake/HTTRAQTFindHttrack.cmake \
|
|
--replace /usr/include/httrack/ ${httrack}/include/httrack/
|
|
|
|
substituteInPlace distribution/posix/CMakeLists.txt \
|
|
--replace /usr/share $out/share
|
|
|
|
substituteInPlace desktop/httraqt.desktop \
|
|
--replace Exec=httraqt Exec=$out/bin/httraqt
|
|
|
|
substituteInPlace sources/main/httraqt.cpp \
|
|
--replace /usr/share/httraqt/ $out/share/httraqt
|
|
'';
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
description = "Easy-to-use offline browser / website mirroring utility - QT frontend";
|
|
mainProgram = "httraqt";
|
|
homepage = "http://www.httrack.com";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
platforms = with platforms; unix;
|
|
};
|
|
}
|