mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +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" ```
72 lines
1.7 KiB
Nix
72 lines
1.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, ninja
|
|
, wrapGAppsHook3
|
|
, makeWrapper
|
|
, wxGTK
|
|
, Cocoa
|
|
, unstableGitUpdater
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "treesheets";
|
|
version = "0-unstable-2024-09-08";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aardappel";
|
|
repo = "treesheets";
|
|
rev = "8db448f67710194d64211ac467ffd2d456854432";
|
|
hash = "sha256-SM62ymN5HXRiyXayoWQaGXLCGEDbHcKMJdPLXDv5dv8=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
ninja
|
|
wrapGAppsHook3
|
|
makeWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
wxGTK
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
Cocoa
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-DPACKAGE_VERSION=\"${builtins.replaceStrings [ "unstable-" ] [ "" ] version}\"";
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
shopt -s extglob
|
|
mkdir -p $out/{share/treesheets,bin}
|
|
mv $out/!(share) $out/share/treesheets
|
|
makeWrapper $out/{share/treesheets,bin}/treesheets \
|
|
--chdir $out/share/treesheets
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = unstableGitUpdater {
|
|
hardcodeZeroVersion = true;
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Free Form Data Organizer";
|
|
mainProgram = "treesheets";
|
|
|
|
longDescription = ''
|
|
The ultimate replacement for spreadsheets, mind mappers, outliners,
|
|
PIMs, text editors and small databases.
|
|
|
|
Suitable for any kind of data organization, such as Todo lists,
|
|
calendars, project management, brainstorming, organizing ideas,
|
|
planning, requirements gathering, presentation of information, etc.
|
|
'';
|
|
|
|
homepage = "https://strlen.com/treesheets/";
|
|
maintainers = with maintainers; [ obadz ];
|
|
platforms = platforms.unix;
|
|
license = licenses.zlib;
|
|
};
|
|
}
|