mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
commit
4f06a00fa9
53
doc/languages-frameworks/hare.section.md
Normal file
53
doc/languages-frameworks/hare.section.md
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# Hare {#sec-language-hare}
|
||||||
|
|
||||||
|
## Building Hare programs with `hareHook` {#ssec-language-hare}
|
||||||
|
|
||||||
|
The `hareHook` package sets up the environment for building Hare programs by
|
||||||
|
doing the following:
|
||||||
|
|
||||||
|
1. Setting the `HARECACHE`, `HAREPATH` and `NIX_HAREFLAGS` environment variables;
|
||||||
|
1. Propagating `harec`, `qbe` and two wrapper scripts for the hare binary.
|
||||||
|
|
||||||
|
It is not a function as is the case for some other languages --- *e. g.*, Go or
|
||||||
|
Rust ---, but a package to be added to `nativeBuildInputs`.
|
||||||
|
|
||||||
|
## Attributes of `hareHook` {#hareHook-attributes}
|
||||||
|
|
||||||
|
The following attributes are accepted by `hareHook`:
|
||||||
|
|
||||||
|
1. `hareBuildType`: Either `release` (default) or `debug`. It controls if the
|
||||||
|
`-R` flag is added to `NIX_HAREFLAGS`.
|
||||||
|
|
||||||
|
## Example for `hareHook` {#ex-hareHook}
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
hareHook,
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
}: stdenv.mkDerivation {
|
||||||
|
pname = "<name>";
|
||||||
|
version = "<version>";
|
||||||
|
src = "<src>";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ hareHook ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "<description>";
|
||||||
|
inherit (hareHook) badPlatforms platforms;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Cross Compilation {#hareHook-cross-compilation}
|
||||||
|
|
||||||
|
`hareHook` should handle cross compilation out of the box. This is the main
|
||||||
|
purpose of `NIX_HAREFLAGS`: In it, the `-a` flag is passed with the architecture
|
||||||
|
of the `hostPlatform`.
|
||||||
|
|
||||||
|
However, manual intervention may be needed when a binary compiled by the build
|
||||||
|
process must be run for the build to complete --- *e. g.*, when using Hare's
|
||||||
|
`hare` module for code generation.
|
||||||
|
|
||||||
|
In those cases, `hareHook` provides the `hare-native` script, which is a wrapper
|
||||||
|
around the hare binary for using the native (`buildPlatform`) toolchain.
|
@ -19,6 +19,7 @@ dotnet.section.md
|
|||||||
emscripten.section.md
|
emscripten.section.md
|
||||||
gnome.section.md
|
gnome.section.md
|
||||||
go.section.md
|
go.section.md
|
||||||
|
hare.section.md
|
||||||
haskell.section.md
|
haskell.section.md
|
||||||
hy.section.md
|
hy.section.md
|
||||||
idris.section.md
|
idris.section.md
|
||||||
|
@ -58,6 +58,10 @@
|
|||||||
|
|
||||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||||
|
|
||||||
|
- `hareHook` has been added as the language framework for Hare. From now on, it,
|
||||||
|
not the `hare` package, should be added to `nativeBuildInputs` when building
|
||||||
|
Hare programs.
|
||||||
|
|
||||||
- To facilitate dependency injection, the `imgui` package now builds a static archive using vcpkg' CMake rules.
|
- To facilitate dependency injection, the `imgui` package now builds a static archive using vcpkg' CMake rules.
|
||||||
The derivation now installs "impl" headers selectively instead of by a wildcard.
|
The derivation now installs "impl" headers selectively instead of by a wildcard.
|
||||||
Use `imgui.src` if you just want to access the unpacked sources.
|
Use `imgui.src` if you just want to access the unpacked sources.
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{ stdenv
|
{
|
||||||
, lib
|
stdenv,
|
||||||
, fetchFromSourcehut
|
lib,
|
||||||
, gitUpdater
|
fetchFromSourcehut,
|
||||||
, hare
|
gitUpdater,
|
||||||
, hareThirdParty
|
hareHook,
|
||||||
|
hareThirdParty,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
@ -18,30 +19,18 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
hare
|
hareHook
|
||||||
hareThirdParty.hare-ev
|
hareThirdParty.hare-ev
|
||||||
hareThirdParty.hare-json
|
hareThirdParty.hare-json
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
"PREFIX=${builtins.placeholder "out"}"
|
|
||||||
"HARECACHE=.harecache"
|
|
||||||
"HAREFLAGS=-qa${stdenv.hostPlatform.uname.processor}"
|
|
||||||
];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
postPatch = ''
|
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
|
||||||
substituteInPlace Makefile \
|
|
||||||
--replace 'hare build' 'hare build $(HAREFLAGS)' \
|
|
||||||
--replace 'hare test' 'hare test $(HAREFLAGS)'
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.updateScript = gitUpdater {
|
|
||||||
rev-prefix = "v";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Finite State Machine structured as a tree";
|
description = "Finite State Machine structured as a tree";
|
||||||
|
56
pkgs/by-name/ha/hare/hook.nix
Normal file
56
pkgs/by-name/ha/hare/hook.nix
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
hare,
|
||||||
|
lib,
|
||||||
|
makeSetupHook,
|
||||||
|
makeWrapper,
|
||||||
|
runCommand,
|
||||||
|
stdenv,
|
||||||
|
writeShellApplication,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
arch = stdenv.targetPlatform.uname.processor;
|
||||||
|
harePropagationInputs = builtins.attrValues { inherit (hare) harec qbe; };
|
||||||
|
hareWrappedScript = writeShellApplication {
|
||||||
|
# `name` MUST be `hare`, since its role is to replace the hare binary.
|
||||||
|
name = "hare";
|
||||||
|
runtimeInputs = [ hare ];
|
||||||
|
excludeShellChecks = [ "SC2086" ];
|
||||||
|
# ''${cmd:+"$cmd"} is used on the default case to keep the same behavior as
|
||||||
|
# the hare binary: If "$cmd" is passed directly and it's empty, the hare
|
||||||
|
# binary will treat it as an unrecognized command.
|
||||||
|
text = ''
|
||||||
|
readonly cmd="$1"
|
||||||
|
shift
|
||||||
|
case "$cmd" in
|
||||||
|
"test"|"run"|"build") exec hare "$cmd" $NIX_HAREFLAGS "$@" ;;
|
||||||
|
*) exec hare ''${cmd:+"$cmd"} "$@"
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
hareWrapper = runCommand "hare-wrapper" { nativeBuildInputs = [ makeWrapper ]; } ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
install ${lib.getExe hareWrappedScript} $out/bin/hare
|
||||||
|
makeWrapper ${lib.getExe hare} $out/bin/hare-native \
|
||||||
|
--inherit-argv0 \
|
||||||
|
--unset AR \
|
||||||
|
--unset LD \
|
||||||
|
--unset CC
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
makeSetupHook {
|
||||||
|
name = "hare-hook";
|
||||||
|
# The propagation of `qbe` and `harec` (harePropagationInputs) is needed for
|
||||||
|
# build frameworks like `haredo`, which set the HAREC and QBE env vars to
|
||||||
|
# `harec` and `qbe` respectively. We use the derivations from the `hare`
|
||||||
|
# package to assure that there's no different behavior between the `hareHook`
|
||||||
|
# and `hare` packages.
|
||||||
|
propagatedBuildInputs = [ hareWrapper ] ++ harePropagationInputs;
|
||||||
|
substitutions = {
|
||||||
|
hare_unconditional_flags = "-q -a${arch}";
|
||||||
|
hare_stdlib = "${hare}/src/hare/stdlib";
|
||||||
|
};
|
||||||
|
meta = {
|
||||||
|
description = "A setup hook for the Hare compiler";
|
||||||
|
inherit (hare.meta) badPlatforms platforms;
|
||||||
|
};
|
||||||
|
} ./setup-hook.sh
|
@ -3,7 +3,6 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
fetchFromSourcehut,
|
fetchFromSourcehut,
|
||||||
harec,
|
harec,
|
||||||
qbe,
|
|
||||||
gitUpdater,
|
gitUpdater,
|
||||||
scdoc,
|
scdoc,
|
||||||
tzdata,
|
tzdata,
|
||||||
@ -33,6 +32,7 @@ assert
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (harec) qbe;
|
||||||
buildArch = stdenv.buildPlatform.uname.processor;
|
buildArch = stdenv.buildPlatform.uname.processor;
|
||||||
arch = stdenv.hostPlatform.uname.processor;
|
arch = stdenv.hostPlatform.uname.processor;
|
||||||
platform = lib.toLower stdenv.hostPlatform.uname.system;
|
platform = lib.toLower stdenv.hostPlatform.uname.system;
|
||||||
@ -130,13 +130,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
scdoc
|
scdoc
|
||||||
];
|
];
|
||||||
|
|
||||||
# Needed for build frameworks like `haredo`, which set the HAREC and QBE env vars to `harec` and
|
|
||||||
# `qbe` respectively.
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
harec
|
|
||||||
qbe
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
harec
|
harec
|
||||||
qbe
|
qbe
|
||||||
@ -171,8 +164,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
ln -s configs/${platform}.mk config.mk
|
ln -s configs/${platform}.mk config.mk
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gitUpdater { };
|
updateScript = gitUpdater { };
|
||||||
tests =
|
tests =
|
||||||
@ -182,6 +173,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
// lib.optionalAttrs (stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
|
// lib.optionalAttrs (stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
|
||||||
mimeModule = callPackage ./mime-module-test.nix { hare = finalAttrs.finalPackage; };
|
mimeModule = callPackage ./mime-module-test.nix { hare = finalAttrs.finalPackage; };
|
||||||
};
|
};
|
||||||
|
# To be propagated by `hareHook`.
|
||||||
|
inherit harec qbe;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -1,9 +1,36 @@
|
|||||||
addHarepath () {
|
# shellcheck disable=SC2154,SC2034,SC2016
|
||||||
for haredir in third-party stdlib; do
|
|
||||||
if [[ -d "$1/src/hare/$haredir" ]]; then
|
addHarepath() {
|
||||||
addToSearchPath HAREPATH "$1/src/hare/$haredir"
|
local -r thirdparty="${1-}/src/hare/third-party"
|
||||||
fi
|
if [[ -d "$thirdparty" ]]; then
|
||||||
done
|
addToSearchPath HAREPATH "$thirdparty"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Hare's stdlib should come after its third party libs, since the latter may
|
||||||
|
# expand or shadow the former.
|
||||||
|
readonly hareSetStdlibPhase='
|
||||||
|
addToSearchPath HAREPATH "@hare_stdlib@"
|
||||||
|
'
|
||||||
|
readonly hareInfoPhase='
|
||||||
|
echoCmd "HARECACHE" "$HARECACHE"
|
||||||
|
echoCmd "HAREPATH" "$HAREPATH"
|
||||||
|
echoCmd "hare" "$(command -v hare)"
|
||||||
|
echoCmd "hare-native" "$(command -v hare-native)"
|
||||||
|
'
|
||||||
|
prePhases+=("hareSetStdlibPhase" "hareInfoPhase")
|
||||||
|
|
||||||
|
readonly hare_unconditional_flags="@hare_unconditional_flags@"
|
||||||
|
case "${hareBuildType:-"release"}" in
|
||||||
|
"release") export NIX_HAREFLAGS="-R $hare_unconditional_flags" ;;
|
||||||
|
"debug") export NIX_HAREFLAGS="$hare_unconditional_flags" ;;
|
||||||
|
*)
|
||||||
|
printf -- 'Invalid hareBuildType: "%s"\n' "${hareBuildType-}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
HARECACHE="$(mktemp -d)"
|
||||||
|
export HARECACHE
|
||||||
|
|
||||||
addEnvHooks "$hostOffset" addHarepath
|
addEnvHooks "$hostOffset" addHarepath
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
{ lib
|
{
|
||||||
, stdenv
|
fetchFromSourcehut,
|
||||||
, fetchFromSourcehut
|
gitUpdater,
|
||||||
, qbe
|
lib,
|
||||||
, gitUpdater
|
qbe,
|
||||||
|
stdenv,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
platform = lib.toLower stdenv.hostPlatform.uname.system;
|
platform = lib.toLower stdenv.hostPlatform.uname.system;
|
||||||
arch = stdenv.hostPlatform.uname.processor;
|
arch = stdenv.hostPlatform.uname.processor;
|
||||||
qbePlatform = {
|
qbePlatform =
|
||||||
x86_64 = "amd64_sysv";
|
{
|
||||||
aarch64 = "arm64";
|
x86_64 = "amd64_sysv";
|
||||||
riscv64 = "rv64";
|
aarch64 = "arm64";
|
||||||
}.${arch};
|
riscv64 = "rv64";
|
||||||
|
}
|
||||||
|
.${arch};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "harec";
|
pname = "harec";
|
||||||
@ -24,13 +27,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-NOfoCT/wKZ3CXYzXZq7plXcun+MXQicfzBOmetXN7Qs=";
|
hash = "sha256-NOfoCT/wKZ3CXYzXZq7plXcun+MXQicfzBOmetXN7Qs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [ qbe ];
|
||||||
qbe
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ qbe ];
|
||||||
qbe
|
|
||||||
];
|
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${builtins.placeholder "out"}"
|
"PREFIX=${builtins.placeholder "out"}"
|
||||||
@ -54,6 +53,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gitUpdater { };
|
updateScript = gitUpdater { };
|
||||||
|
# To be kept in sync with the hare package.
|
||||||
|
inherit qbe;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -65,7 +66,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
# The upstream developers do not like proprietary operating systems; see
|
# The upstream developers do not like proprietary operating systems; see
|
||||||
# https://harelang.org/platforms/
|
# https://harelang.org/platforms/
|
||||||
# UPDATE: https://github.com/hshq/harelang provides a MacOS port
|
# UPDATE: https://github.com/hshq/harelang provides a MacOS port
|
||||||
platforms = with lib.platforms;
|
platforms =
|
||||||
|
with lib.platforms;
|
||||||
lib.intersectLists (freebsd ++ openbsd ++ linux) (aarch64 ++ x86_64 ++ riscv64);
|
lib.intersectLists (freebsd ++ openbsd ++ linux) (aarch64 ++ x86_64 ++ riscv64);
|
||||||
badPlatforms = lib.platforms.darwin;
|
badPlatforms = lib.platforms.darwin;
|
||||||
};
|
};
|
||||||
|
@ -2,16 +2,13 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
fetchFromSourcehut,
|
fetchFromSourcehut,
|
||||||
hare,
|
hareHook,
|
||||||
scdoc,
|
scdoc,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
bash,
|
bash,
|
||||||
substituteAll,
|
substituteAll,
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
arch = stdenv.hostPlatform.uname.processor;
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "haredo";
|
pname = "haredo";
|
||||||
version = "1.0.5";
|
version = "1.0.5";
|
||||||
@ -37,27 +34,23 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
hare
|
hareHook
|
||||||
makeWrapper
|
makeWrapper
|
||||||
scdoc
|
scdoc
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelChecking = true;
|
enableParallelChecking = true;
|
||||||
|
|
||||||
|
env.PREFIX = builtins.placeholder "out";
|
||||||
|
|
||||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
HARECACHE="$(mktemp -d)"
|
|
||||||
export HARECACHE
|
|
||||||
export PREFIX=${builtins.placeholder "out"}
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
hare build -o bin/haredo -qRa${arch} ./src
|
hare build -o bin/haredo ./src
|
||||||
scdoc <doc/haredo.1.scd >doc/haredo.1
|
scdoc <doc/haredo.1.scd >doc/haredo.1
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
@ -92,6 +85,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
license = lib.licenses.wtfpl;
|
license = lib.licenses.wtfpl;
|
||||||
maintainers = with lib.maintainers; [ onemoresuza ];
|
maintainers = with lib.maintainers; [ onemoresuza ];
|
||||||
mainProgram = "haredo";
|
mainProgram = "haredo";
|
||||||
inherit (hare.meta) platforms badPlatforms;
|
inherit (hareHook.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -1,33 +1,31 @@
|
|||||||
{ lib
|
{
|
||||||
, stdenv
|
lib,
|
||||||
, scdoc
|
stdenv,
|
||||||
, hare
|
scdoc,
|
||||||
|
hare,
|
||||||
|
hareHook,
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
arch = stdenv.hostPlatform.uname.processor;
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "haredoc";
|
pname = "haredoc";
|
||||||
outputs = [ "out" "man" ];
|
outputs = [
|
||||||
|
"out"
|
||||||
|
"man"
|
||||||
|
];
|
||||||
inherit (hare) version src;
|
inherit (hare) version src;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
scdoc
|
scdoc
|
||||||
hare
|
hareHook
|
||||||
];
|
];
|
||||||
|
|
||||||
preBuild = ''
|
strictDeps = true;
|
||||||
HARECACHE="$(mktemp -d)"
|
|
||||||
export HARECACHE
|
enableParallelBuilding = true;
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
hare build -qR -a ${arch} -o haredoc ./cmd/haredoc
|
hare build -o haredoc ./cmd/haredoc
|
||||||
scdoc <docs/haredoc.1.scd >haredoc.1
|
scdoc <docs/haredoc.1.scd >haredoc.1
|
||||||
scdoc <docs/haredoc.5.scd >haredoc.5
|
scdoc <docs/haredoc.5.scd >haredoc.5
|
||||||
|
|
||||||
@ -50,6 +48,6 @@ stdenv.mkDerivation {
|
|||||||
license = lib.licenses.gpl3Only;
|
license = lib.licenses.gpl3Only;
|
||||||
maintainers = with lib.maintainers; [ onemoresuza ];
|
maintainers = with lib.maintainers; [ onemoresuza ];
|
||||||
mainProgram = "haredoc";
|
mainProgram = "haredoc";
|
||||||
inherit (hare.meta) platforms badPlatforms;
|
inherit (hareHook.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
{ stdenv
|
{
|
||||||
, fetchFromSourcehut
|
stdenv,
|
||||||
, hare
|
fetchFromSourcehut,
|
||||||
, haredo
|
hareHook,
|
||||||
, lib
|
haredo,
|
||||||
, scdoc
|
lib,
|
||||||
|
scdoc,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "treecat";
|
pname = "treecat";
|
||||||
version = "1.0.2-unstable-2023-11-28";
|
version = "1.0.2-unstable-2023-11-28";
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
outputs = [
|
||||||
|
"out"
|
||||||
|
"man"
|
||||||
|
];
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~autumnull";
|
owner = "~autumnull";
|
||||||
@ -19,18 +23,14 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
hare
|
hareHook
|
||||||
haredo
|
haredo
|
||||||
scdoc
|
scdoc
|
||||||
];
|
];
|
||||||
|
|
||||||
dontConfigure = true;
|
env.PREFIX = builtins.placeholder "out";
|
||||||
|
|
||||||
preBuild = ''
|
dontConfigure = true;
|
||||||
HARECACHE="$(mktemp -d)"
|
|
||||||
export HARECACHE
|
|
||||||
export PREFIX="${builtins.placeholder "out"}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Serialize a directory to a tree diagram, and vice versa";
|
description = "Serialize a directory to a tree diagram, and vice versa";
|
||||||
@ -42,6 +42,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
license = lib.licenses.wtfpl;
|
license = lib.licenses.wtfpl;
|
||||||
maintainers = with lib.maintainers; [ onemoresuza ];
|
maintainers = with lib.maintainers; [ onemoresuza ];
|
||||||
mainProgram = "treecat";
|
mainProgram = "treecat";
|
||||||
inherit (hare.meta) platforms badPlatforms;
|
inherit (hareHook.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
{ lib, stdenv, hare, harec, fetchFromSourcehut }:
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
hareHook,
|
||||||
|
harec,
|
||||||
|
fetchFromSourcehut,
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hare-compress";
|
pname = "hare-compress";
|
||||||
version = "unstable-2023-11-01";
|
version = "0-unstable-2023-11-01";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~sircmpwn";
|
owner = "~sircmpwn";
|
||||||
@ -11,12 +17,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-sz8xPBZaUFye3HH4lkRnH52ye451e6seZXN/qvg87jE=";
|
hash = "sha256-sz8xPBZaUFye3HH4lkRnH52ye451e6seZXN/qvg87jE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ hare ];
|
nativeBuildInputs = [ hareHook ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
"HARECACHE=.harecache"
|
|
||||||
"PREFIX=${builtins.placeholder "out"}"
|
|
||||||
];
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -25,7 +28,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
description = "Compression algorithms for Hare";
|
description = "Compression algorithms for Hare";
|
||||||
license = with licenses; [ mpl20 ];
|
license = with licenses; [ mpl20 ];
|
||||||
maintainers = with maintainers; [ starzation ];
|
maintainers = with maintainers; [ starzation ];
|
||||||
|
|
||||||
inherit (harec.meta) platforms badPlatforms;
|
inherit (harec.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{ stdenv
|
{
|
||||||
, lib
|
fetchFromSourcehut,
|
||||||
, fetchFromSourcehut
|
hareHook,
|
||||||
, hare
|
lib,
|
||||||
, unstableGitUpdater
|
stdenv,
|
||||||
|
unstableGitUpdater,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -16,14 +17,9 @@ stdenv.mkDerivation {
|
|||||||
hash = "sha256-SXExwDZKlW/2XYzmJUhkLWj6NF/znrv3vY9V0mD5iFQ=";
|
hash = "sha256-SXExwDZKlW/2XYzmJUhkLWj6NF/znrv3vY9V0mD5iFQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [ hareHook ];
|
||||||
hare
|
|
||||||
];
|
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
"HARECACHE=.harecache"
|
|
||||||
"PREFIX=${builtins.placeholder "out"}"
|
|
||||||
];
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -34,6 +30,6 @@ stdenv.mkDerivation {
|
|||||||
homepage = "https://sr.ht/~sircmpwn/hare-ev";
|
homepage = "https://sr.ht/~sircmpwn/hare-ev";
|
||||||
license = licenses.mpl20;
|
license = licenses.mpl20;
|
||||||
maintainers = with maintainers; [ colinsane ];
|
maintainers = with maintainers; [ colinsane ];
|
||||||
inherit (hare.meta) platforms badPlatforms;
|
inherit (hareHook.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
{ lib, stdenv, hare, harec, fetchFromSourcehut }:
|
{
|
||||||
|
fetchFromSourcehut,
|
||||||
|
hareHook,
|
||||||
|
harec,
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hare-json";
|
pname = "hare-json";
|
||||||
version = "unstable-2023-03-13";
|
version = "0-unstable-2023-03-13";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~sircmpwn";
|
owner = "~sircmpwn";
|
||||||
@ -11,12 +17,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-Sx+RBiLhR3ftP89AwinVlBg0u0HX4GVP7TLmuofgC9s=";
|
hash = "sha256-Sx+RBiLhR3ftP89AwinVlBg0u0HX4GVP7TLmuofgC9s=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ hare ];
|
nativeBuildInputs = [ hareHook ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
"HARECACHE=.harecache"
|
|
||||||
"PREFIX=${builtins.placeholder "out"}"
|
|
||||||
];
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -25,7 +28,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
description = "This package provides JSON support for Hare";
|
description = "This package provides JSON support for Hare";
|
||||||
license = with licenses; [ mpl20 ];
|
license = with licenses; [ mpl20 ];
|
||||||
maintainers = with maintainers; [ starzation ];
|
maintainers = with maintainers; [ starzation ];
|
||||||
|
|
||||||
inherit (harec.meta) platforms badPlatforms;
|
inherit (harec.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
{ lib, stdenv, hare, hareThirdParty, fetchFromSourcehut }:
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
hareHook,
|
||||||
|
hareThirdParty,
|
||||||
|
fetchFromSourcehut,
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hare-png";
|
pname = "hare-png";
|
||||||
version = "unstable-2023-09-09";
|
version = "0-unstable-2023-09-09";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~sircmpwn";
|
owner = "~sircmpwn";
|
||||||
@ -11,13 +17,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-Q7xylsLVd/sp57kv6WzC7QHGN1xOsm7YEsYCbY/zi1Q=";
|
hash = "sha256-Q7xylsLVd/sp57kv6WzC7QHGN1xOsm7YEsYCbY/zi1Q=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ hare ];
|
nativeBuildInputs = [ hareHook ];
|
||||||
propagatedBuildInputs = [ hareThirdParty.hare-compress ];
|
propagatedBuildInputs = [ hareThirdParty.hare-compress ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
"PREFIX=${builtins.placeholder "out"}"
|
|
||||||
"HARECACHE=.harecache"
|
|
||||||
];
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -26,7 +29,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
description = "PNG implementation for Hare";
|
description = "PNG implementation for Hare";
|
||||||
license = with licenses; [ mpl20 ];
|
license = with licenses; [ mpl20 ];
|
||||||
maintainers = with maintainers; [ starzation ];
|
maintainers = with maintainers; [ starzation ];
|
||||||
|
inherit (hareHook.meta) platforms badPlatforms;
|
||||||
inherit (hare.meta) platforms badPlatforms;
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
{ lib, stdenv, hare, hareThirdParty, fetchFromSourcehut }:
|
{
|
||||||
|
fetchFromSourcehut,
|
||||||
|
hareHook,
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hare-ssh";
|
pname = "hare-ssh";
|
||||||
version = "unstable-2023-11-16";
|
version = "0-unstable-2023-11-16";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~sircmpwn";
|
owner = "~sircmpwn";
|
||||||
@ -11,12 +16,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-I43TLPoImBsvkgV3hDy9dw0pXVt4ezINnxFtEV9P2/M=";
|
hash = "sha256-I43TLPoImBsvkgV3hDy9dw0pXVt4ezINnxFtEV9P2/M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ hare ];
|
nativeBuildInputs = [ hareHook ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
"PREFIX=${builtins.placeholder "out"}"
|
|
||||||
"HARECACHE=.harecache"
|
|
||||||
];
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -26,6 +28,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
license = with licenses; [ mpl20 ];
|
license = with licenses; [ mpl20 ];
|
||||||
maintainers = with maintainers; [ patwid ];
|
maintainers = with maintainers; [ patwid ];
|
||||||
|
|
||||||
inherit (hare.meta) platforms badPlatforms;
|
inherit (hareHook.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{ stdenv
|
{
|
||||||
, hare
|
fetchFromGitea,
|
||||||
, scdoc
|
hareHook,
|
||||||
, lib
|
lib,
|
||||||
, fetchFromGitea
|
nix-update-script,
|
||||||
, nix-update-script
|
scdoc,
|
||||||
|
stdenv,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hare-toml";
|
pname = "hare-toml";
|
||||||
@ -19,13 +20,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
scdoc
|
scdoc
|
||||||
hare
|
hareHook
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
"HARECACHE=.harecache"
|
|
||||||
"PREFIX=${builtins.placeholder "out"}"
|
|
||||||
];
|
|
||||||
|
|
||||||
checkTarget = "check_local";
|
checkTarget = "check_local";
|
||||||
|
|
||||||
@ -40,6 +38,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
homepage = "https://codeberg.org/lunacb/hare-toml";
|
homepage = "https://codeberg.org/lunacb/hare-toml";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ onemoresuza ];
|
maintainers = with lib.maintainers; [ onemoresuza ];
|
||||||
inherit (hare.meta) platforms badPlatforms;
|
inherit (hareHook.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -1,38 +1,34 @@
|
|||||||
{ lib
|
{
|
||||||
, stdenv
|
fetchFromSourcehut,
|
||||||
, fetchFromSourcehut
|
hareHook,
|
||||||
, hare
|
lib,
|
||||||
, scdoc
|
scdoc,
|
||||||
|
stdenv,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "himitsu";
|
pname = "himitsu";
|
||||||
version = "0.7";
|
version = "0.7";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
name = pname + "-src";
|
|
||||||
owner = "~sircmpwn";
|
owner = "~sircmpwn";
|
||||||
repo = pname;
|
repo = "himitsu";
|
||||||
rev = version;
|
rev = finalAttrs.version;
|
||||||
hash = "sha256-jDxQajc8Kyfihm8q3wCpA+WsbAkQEZerLckLQXNhTa8=";
|
hash = "sha256-jDxQajc8Kyfihm8q3wCpA+WsbAkQEZerLckLQXNhTa8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
hare
|
hareHook
|
||||||
scdoc
|
scdoc
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
installFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
export HARECACHE=$(mktemp -d)
|
|
||||||
'';
|
|
||||||
|
|
||||||
installFlags = [ "PREFIX=" "DESTDIR=$(out)" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://himitsustore.org/";
|
homepage = "https://himitsustore.org/";
|
||||||
description = "A secret storage manager";
|
description = "A secret storage manager";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Only;
|
||||||
maintainers = with maintainers; [ auchter ];
|
maintainers = with maintainers; [ auchter ];
|
||||||
inherit (hare.meta) platforms badPlatforms;
|
inherit (hareHook.meta) platforms badPlatforms;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
@ -25183,6 +25183,10 @@ with pkgs;
|
|||||||
|
|
||||||
leaps = callPackage ../development/tools/leaps { };
|
leaps = callPackage ../development/tools/leaps { };
|
||||||
|
|
||||||
|
### DEVELOPMENT / HARE
|
||||||
|
|
||||||
|
hareHook = callPackage ../by-name/ha/hare/hook.nix { };
|
||||||
|
|
||||||
### DEVELOPMENT / JAVA MODULES
|
### DEVELOPMENT / JAVA MODULES
|
||||||
|
|
||||||
javaPackages = recurseIntoAttrs (callPackage ./java-packages.nix { });
|
javaPackages = recurseIntoAttrs (callPackage ./java-packages.nix { });
|
||||||
|
Loading…
Reference in New Issue
Block a user