1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-18 15:14:49 -04:00
nixpkgs/pkgs/desktops/gnome-2/platform/GConf/default.nix
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
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"
```
2024-09-25 00:04:37 +03:00

39 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, pkg-config, dbus-glib, glib, ORBit2, libxml2, polkit, python3, intltool }:
stdenv.mkDerivation rec {
pname = "gconf";
version = "3.2.6";
src = fetchurl {
url = "mirror://gnome/sources/GConf/${lib.versions.majorMinor version}/GConf-${version}.tar.xz";
sha256 = "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr";
};
outputs = [ "out" "dev" "man" ];
strictDeps = true;
buildInputs = [ ORBit2 libxml2 ]
# polkit requires pam, which requires shadow.h, which is not available on
# darwin
++ lib.optional (!stdenv.hostPlatform.isDarwin) polkit;
propagatedBuildInputs = [ glib dbus-glib ];
nativeBuildInputs = [ pkg-config intltool python3 glib ];
configureFlags =
# fixes the "libgconfbackend-oldxml.so is not portable" error on darwin
lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-static" ];
postPatch = ''
2to3 --write --nobackup gsettings/gsettings-schema-convert
'';
meta = with lib; {
homepage = "https://projects.gnome.org/gconf/";
description = "Deprecated system for storing application preferences";
platforms = platforms.unix;
};
}