mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-09 15:23:16 +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" ```
59 lines
1.3 KiB
Nix
59 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, groff
|
|
, makeWrapper
|
|
, ncurses
|
|
, runtimeShell
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "jove";
|
|
version = "4.17.5.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jonmacs";
|
|
repo = "jove";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-ZBq2zCml637p9VgedpOrUn2jSc5L0pthdgRS7YsB3zs=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [
|
|
groff
|
|
ncurses
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs testbuild.sh testmailer.sh teachjove jmake.sh
|
|
'';
|
|
|
|
dontConfigure = true;
|
|
|
|
preBuild = ''
|
|
makeFlagsArray+=(SYSDEFS="-DSYSVR4 -D_XOPEN_SOURCE=500" \
|
|
JTMPDIR=$TMPDIR
|
|
TERMCAPLIB=-lncurses \
|
|
SHELL=${runtimeShell} \
|
|
DFLTSHELL=${runtimeShell} \
|
|
JOVEHOME=${placeholder "out"})
|
|
'';
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/teachjove \
|
|
--prefix PATH ":" "$out/bin"
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://github.com/jonmacs/jove";
|
|
description = "Jonathan's Own Version of Emacs";
|
|
changelog = "https://github.com/jonmacs/jove/releases/tag/${finalAttrs.version}";
|
|
license = lib.licenses.bsd2;
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
platforms = lib.platforms.unix;
|
|
# never built on Hydra: https://hydra.nixos.org/job/nixpkgs/trunk/jove.x86_64-darwin
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
})
|