mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00

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" ```
60 lines
1.4 KiB
Nix
60 lines
1.4 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitLab
|
|
, fetchpatch
|
|
, gobject-introspection
|
|
, intltool
|
|
, python3
|
|
, wrapGAppsHook3
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "onioncircuits";
|
|
version = "0.7";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.tails.boum.org";
|
|
owner = "tails";
|
|
repo = "onioncircuits";
|
|
rev = version;
|
|
sha256 = "sha256-O4tSbKBTmve4u8bXVg128RLyuxvTbU224JV8tQ+aDAQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
gobject-introspection
|
|
intltool
|
|
wrapGAppsHook3
|
|
python3.pkgs.distutils-extra
|
|
];
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
pygobject3
|
|
stem
|
|
];
|
|
|
|
patches = [
|
|
# Fix https://gitlab.tails.boum.org/tails/onioncircuits/-/merge_requests/4
|
|
(fetchpatch {
|
|
name = "fix-setuptool-package-discovery.patch";
|
|
url = "https://gitlab.tails.boum.org/tails/onioncircuits/-/commit/4c620c77f36f540fa27041fcbdeaf05c9f57826c.patch";
|
|
sha256 = "sha256-WXqyDa2meRMMHkHLO5Xl7x43KUGtlsai+eOVzUGUPpo=";
|
|
})
|
|
];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/etc/apparmor.d
|
|
|
|
cp apparmor/usr.bin.onioncircuits $out/etc/apparmor.d
|
|
'';
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
homepage = "https://tails.boum.org";
|
|
description = "GTK application to display Tor circuits and streams";
|
|
mainProgram = "onioncircuits";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ milran ];
|
|
};
|
|
}
|
|
|