cdecl: copy to cdecl-blocks, cdecl: 2.5 -> 16.3, changed upstream url
This commit is contained in:
parent
be3aee43dd
commit
ce95595c1f
82
pkgs/by-name/cd/cdecl-blocks/package.nix
Normal file
82
pkgs/by-name/cd/cdecl-blocks/package.nix
Normal file
@ -0,0 +1,82 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
bison,
|
||||
flex,
|
||||
readline,
|
||||
ncurses,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "cdecl-blocks";
|
||||
version = "2.5-unstable-2024-05-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ridiculousfish";
|
||||
repo = "cdecl-blocks";
|
||||
rev = "1e6e1596771183d9bb90bcf152d6bc2055219a7e";
|
||||
hash = "sha256-5XuiYkFe+QvVBRIXRieKoE0zbISMvU1iLgEfkw6GnlE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./cdecl-2.5-lex.patch
|
||||
# when `USE_READLINE` is enabled, this option will not be present
|
||||
./test_remove_interactive_line.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace cdecl.c \
|
||||
--replace 'getline' 'cdecl_getline'
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
flex
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
readline
|
||||
ncurses
|
||||
];
|
||||
|
||||
env = {
|
||||
NIX_CFLAGS_COMPILE = toString (
|
||||
[
|
||||
"-DBSD"
|
||||
"-DUSE_READLINE"
|
||||
]
|
||||
++ lib.optionals stdenv.cc.isClang [
|
||||
"-Wno-error=int-conversion"
|
||||
"-Wno-error=incompatible-function-pointer-types"
|
||||
]
|
||||
);
|
||||
NIX_LDFLAGS = "-lreadline";
|
||||
};
|
||||
|
||||
makeFlags = [
|
||||
"CC=${lib.getExe stdenv.cc}"
|
||||
"PREFIX=${placeholder "out"}"
|
||||
"BINDIR=${placeholder "out"}/bin"
|
||||
"MANDIR=${placeholder "out"}/man1"
|
||||
"CATDIR=${placeholder "out"}/cat1"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin;
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Translator English -- C/C++ declarations";
|
||||
homepage = "https://cdecl.org";
|
||||
license = lib.licenses.publicDomain;
|
||||
maintainers = with lib.maintainers; [ sigmanificient ];
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "cdecl";
|
||||
};
|
||||
}
|
@ -2,45 +2,29 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
autoconf,
|
||||
automake,
|
||||
bison,
|
||||
flex,
|
||||
readline,
|
||||
ncurses,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cdecl";
|
||||
version = "2.5-unstable-2024-05-07";
|
||||
version = "16.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ridiculousfish";
|
||||
repo = "cdecl-blocks";
|
||||
rev = "1e6e1596771183d9bb90bcf152d6bc2055219a7e";
|
||||
hash = "sha256-5XuiYkFe+QvVBRIXRieKoE0zbISMvU1iLgEfkw6GnlE=";
|
||||
owner = "paul-j-lucas";
|
||||
repo = "cdecl";
|
||||
rev = "refs/tags/cdecl-${finalAttrs.version}";
|
||||
hash = "sha256-4rysv/iLohx2y7WEaP4BG7lT1tm4FfU0NWcxI4gvUsg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./cdecl-2.5-lex.patch
|
||||
# when `USE_READLINE` is enabled, this option will not be present
|
||||
./test_remove_interactive_line.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace cdecl.c \
|
||||
--replace 'getline' 'cdecl_getline'
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
preConfigure = "./bootstrap";
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
flex
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
readline
|
||||
ncurses
|
||||
];
|
||||
nativeBuildInputs = [ autoconf automake bison flex ];
|
||||
buildInputs = [ readline ];
|
||||
|
||||
env = {
|
||||
NIX_CFLAGS_COMPILE = toString (
|
||||
@ -71,12 +55,14 @@ stdenv.mkDerivation {
|
||||
mkdir -p $out/bin;
|
||||
'';
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
meta = {
|
||||
description = "Translator English -- C/C++ declarations";
|
||||
homepage = "https://cdecl.org";
|
||||
license = lib.licenses.publicDomain;
|
||||
description = "Composing and deciphering C (or C++) declarations or casts, aka ''gibberish.''";
|
||||
homepage = "https://github.com/paul-j-lucas/cdecl";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ sigmanificient ];
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "cdecl";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user