mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 14:03:29 +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" ```
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{ lib
|
|
, darwin
|
|
, fetchzip
|
|
, ocamlPackages
|
|
, soupault
|
|
, stdenv
|
|
, testers
|
|
}:
|
|
|
|
ocamlPackages.buildDunePackage rec {
|
|
pname = "soupault";
|
|
version = "4.11.0";
|
|
|
|
minimalOCamlVersion = "4.13";
|
|
|
|
src = fetchzip {
|
|
urls = [
|
|
"https://github.com/PataphysicalSociety/soupault/archive/${version}.tar.gz"
|
|
"https://codeberg.org/PataphysicalSociety/soupault/archive/${version}.tar.gz"
|
|
];
|
|
hash = "sha256-UABbrNNcNaN9NgtAjCs4HUoNXMaK4QvCuWERuEnMG6I=";
|
|
};
|
|
|
|
nativeBuildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ darwin.sigtool ];
|
|
|
|
buildInputs = with ocamlPackages; [
|
|
base64
|
|
camomile
|
|
containers
|
|
csv
|
|
digestif
|
|
ezjsonm
|
|
fileutils
|
|
fmt
|
|
jingoo
|
|
lambdasoup
|
|
lua-ml
|
|
logs
|
|
markup
|
|
odate
|
|
otoml
|
|
re
|
|
spelll
|
|
tsort
|
|
yaml
|
|
];
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = soupault;
|
|
command = "soupault --version-number";
|
|
};
|
|
|
|
meta = {
|
|
description = "Tool that helps you create and manage static websites";
|
|
homepage = "https://soupault.app/";
|
|
changelog = "https://codeberg.org/PataphysicalSociety/soupault/src/branch/main/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ toastal ];
|
|
mainProgram = "soupault";
|
|
};
|
|
}
|