mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
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" ```
74 lines
1.4 KiB
Nix
74 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cargo
|
|
, glib
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, rustPlatform
|
|
, rustc
|
|
, wrapGAppsHook4
|
|
, gdk-pixbuf
|
|
, gtk4
|
|
, libadwaita
|
|
, libsecret
|
|
, openssl
|
|
, sqlite
|
|
, darwin
|
|
, gettext
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "done";
|
|
version = "0.2.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "done-devs";
|
|
repo = "done";
|
|
rev = "v${version}";
|
|
hash = "sha256-SbeP7PnJd7jjdXa9uDIAlMAJLOrYHqNP5p9gQclb6RU=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
inherit src;
|
|
name = "${pname}-${version}";
|
|
hash = "sha256-YJJGQR1tkK5z7vQQgkd8xPSqYhtiZIN+s9Xnwjn0z5A=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cargo
|
|
glib
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
rustPlatform.cargoSetupHook
|
|
rustc
|
|
wrapGAppsHook4
|
|
];
|
|
|
|
buildInputs = [
|
|
gdk-pixbuf
|
|
gtk4
|
|
libadwaita
|
|
libsecret
|
|
openssl
|
|
sqlite
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
];
|
|
|
|
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
|
|
GETTEXT_DIR = gettext;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Ultimate task management solution for seamless organization and efficiency";
|
|
homepage = "https://done.edfloreshz.dev/";
|
|
changelog = "https://github.com/done-devs/done/blob/${src.rev}/CHANGES.md";
|
|
license = licenses.mpl20;
|
|
mainProgram = "done";
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|