Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2023-06-10 18:01:41 +00:00 committed by GitHub
commit 9f2767ce37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 2031 additions and 165 deletions

View file

@ -215,6 +215,12 @@ in mkLicense lset) ({
url = "https://opensource.org/licenses/CAL-1.0";
};
caldera = {
spdxId = "Caldera";
fullName = "Caldera License";
url = "http://www.lemis.com/grog/UNIX/ancient-source-all.pdf";
};
capec = {
fullName = "Common Attack Pattern Enumeration and Classification";
url = "https://capec.mitre.org/about/termsofuse.html";
@ -556,6 +562,12 @@ in mkLicense lset) ({
fullName = "Imlib2 License";
};
info-zip = {
spdxId = "Info-ZIP";
fullName = "Info-ZIP License";
url = "http://www.info-zip.org/pub/infozip/license.html";
};
inria-compcert = {
fullName = "INRIA Non-Commercial License Agreement for the CompCert verified compiler";
url = "https://compcert.org/doc/LICENSE.txt";

View file

@ -4946,6 +4946,12 @@
githubId = 1847524;
name = "Evan Stoll";
};
evanrichter = {
email = "evanjrichter@gmail.com";
github = "evanrichter";
githubId = 330292;
name = "Evan Richter";
};
evax = {
email = "nixos@evax.fr";
github = "evax";

View file

@ -263,7 +263,8 @@ let
if cfg.useEFIBoot then "efi_bootloading_with_default_fs"
else "legacy_bootloading_with_default_fs"
else
"direct_boot_with_default_fs"
if cfg.directBoot.enable then "direct_boot_with_default_fs"
else "custom"
else
"custom";
suggestedRootDevice = {
@ -769,6 +770,40 @@ in
'';
};
virtualisation.directBoot = {
enable =
mkOption {
type = types.bool;
default = !cfg.useBootLoader;
defaultText = "!cfg.useBootLoader";
description =
lib.mdDoc ''
If enabled, the virtual machine will boot directly into the kernel instead of through a bootloader. Other relevant parameters such as the initrd are also passed to QEMU.
If you want to test netboot, consider disabling this option.
This will not boot / reboot correctly into a system that has switched to a different configuration on disk.
This is enabled by default if you don't enable bootloaders, but you can still enable a bootloader if you need.
Read more about this feature: <https://qemu-project.gitlab.io/qemu/system/linuxboot.html>.
'';
};
initrd =
mkOption {
type = types.str;
default = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}";
defaultText = "\${config.system.build.initialRamdisk}/\${config.system.boot.loader.initrdFile}";
description =
lib.mdDoc ''
In direct boot situations, you may want to influence the initrd to load
to use your own customized payload.
This is useful if you want to test the netboot image without
testing the firmware or the loading part.
'';
};
};
virtualisation.useBootLoader =
mkOption {
type = types.bool;
@ -895,6 +930,18 @@ in
virtualisation.memorySize is above 2047, but qemu is only able to allocate 2047MB RAM on 32bit max.
'';
}
{ assertion = cfg.directBoot.initrd != options.virtualisation.directBoot.initrd.default -> cfg.directBoot.enable;
message =
''
You changed the default of `virtualisation.directBoot.initrd` but you are not
using QEMU direct boot. This initrd will not be used in your current
boot configuration.
Either do not mutate `virtualisation.directBoot.initrd` or enable direct boot.
If you have a more advanced usecase, please open an issue or a pull request.
'';
}
];
warnings =
@ -915,6 +962,11 @@ in
Otherwise, we recommend
${opt.writableStore} = false;
''
++ optional (cfg.directBoot.enable && cfg.useBootLoader)
''
You enabled direct boot and a bootloader, QEMU will not boot your bootloader, rendering
`useBootLoader` useless. You might want to disable one of those options.
'';
# In UEFI boot, we use a EFI-only partition table layout, thus GRUB will fail when trying to install
@ -1036,9 +1088,9 @@ in
alphaNumericChars = lowerChars ++ upperChars ++ (map toString (range 0 9));
# Replace all non-alphanumeric characters with underscores
sanitizeShellIdent = s: concatMapStrings (c: if builtins.elem c alphaNumericChars then c else "_") (stringToCharacters s);
in mkIf (!cfg.useBootLoader) [
in mkIf cfg.directBoot.enable [
"-kernel \${NIXPKGS_QEMU_KERNEL_${sanitizeShellIdent config.system.name}:-${config.system.build.toplevel}/kernel}"
"-initrd ${config.system.build.toplevel}/initrd"
"-initrd ${cfg.directBoot.initrd}"
''-append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo}/registration ${consoles} $QEMU_KERNEL_PARAMS"''
])
(mkIf cfg.useEFIBoot [

View file

@ -14,22 +14,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
connect-timeout = 1;
};
system.extraDependencies = with pkgs; [
curl
desktop-file-utils
docbook5
docbook_xsl_ns
grub2
kmod.dev
libarchive
libarchive.dev
libxml2.bin
libxslt.bin
python3Minimal
shared-mime-info
stdenv
sudo
xorg.lndir
system.includeBuildDependencies = true;
system.extraDependencies = [
# Not part of the initial build apparently?
pkgs.grub2
];
virtualisation = {

View file

@ -207,11 +207,17 @@ in
nodes = {
inherit common;
machine = { pkgs, ... }: {
machine = { pkgs, nodes, ... }: {
imports = [ common ];
boot.loader.systemd-boot.extraFiles = {
"efi/fruits/tomato.efi" = pkgs.netbootxyz-efi;
};
# These are configs for different nodes, but we'll use them here in `machine`
system.extraDependencies = [
nodes.common.system.build.toplevel
nodes.with_netbootxyz.system.build.toplevel
];
};
with_netbootxyz = { pkgs, ... }: {
@ -221,9 +227,9 @@ in
};
testScript = { nodes, ... }: let
originalSystem = nodes.machine.config.system.build.toplevel;
baseSystem = nodes.common.config.system.build.toplevel;
finalSystem = nodes.with_netbootxyz.config.system.build.toplevel;
originalSystem = nodes.machine.system.build.toplevel;
baseSystem = nodes.common.system.build.toplevel;
finalSystem = nodes.with_netbootxyz.system.build.toplevel;
in ''
machine.succeed("test -e /boot/efi/fruits/tomato.efi")
machine.succeed("test -e /boot/efi/nixos/.extra-files/efi/fruits/tomato.efi")

View file

@ -16,13 +16,13 @@
stdenv.mkDerivation rec {
pname = "mympd";
version = "10.3.2";
version = "10.3.3";
src = fetchFromGitHub {
owner = "jcorporation";
repo = "myMPD";
rev = "v${version}";
sha256 = "sha256-VnV0jZp2ymsZkVIDBYXHhJTR10CZ74wutue1GTGQtxI=";
sha256 = "sha256-LqIaRFAXB3XMidC1Dypax/ucayot/IJPAvPwzHQeH9k=";
};
nativeBuildInputs = [

View file

@ -2,13 +2,13 @@
buildNpmPackage rec {
pname = "open-stage-control";
version = "1.25.0";
version = "1.25.1";
src = fetchFromGitHub {
owner = "jean-emmanuel";
repo = "open-stage-control";
rev = "v${version}";
hash = "sha256-HbJFxgY/xba6X73TK40xXyLZiIxv1Ku/sVAekjApYFg=";
hash = "sha256-mbd+fknSzokFt5dPlZrZIpDox/NzMbvyFp2fNPelv3c=";
};
# Remove some Electron stuff from package.json

View file

@ -13,6 +13,8 @@ in
agda2-mode = callPackage ./manual-packages/agda2-mode { };
beancount = callPackage ./manual-packages/beancount { };
cask = callPackage ./manual-packages/cask { };
control-lock = callPackage ./manual-packages/control-lock { };

View file

@ -0,0 +1,35 @@
{ lib
, melpaBuild
, fetchFromGitHub
, emacs
, writeText
}:
let
rev = "519bfd868f206ed2fc538a57cdb631c4fec3c93e";
in
melpaBuild {
pname = "beancount";
version = "20230205.436";
src = fetchFromGitHub {
owner = "beancount";
repo = "beancount-mode";
inherit rev;
hash = "sha256-nTEXJdPEPZpNm06uYvRxLuiOHmsiIgMLerd//dA0+KQ=";
};
commit = rev;
recipe = writeText "recipe" ''
(beancount :repo "beancount/beancount-mode" :fetcher github)
'';
meta = {
homepage = "https://github.com/beancount/beancount-mode";
description = "Emacs major-mode to work with Beancount ledger files";
maintainers = with lib.maintainers; [ polarmutex ];
license = lib.licenses.gpl3Only;
inherit (emacs.meta) platforms;
};
}

View file

@ -61,7 +61,7 @@ rustPlatform.buildRustPackage rec {
./cargo.patch
];
# Manually simulate a vcpkg installation so that it can link the libaries
# Manually simulate a vcpkg installation so that it can link the libraries
# properly.
postUnpack =
let

View file

@ -11,16 +11,16 @@
buildGoModule rec {
pname = "rymdport";
version = "3.3.6";
version = "3.4.0";
src = fetchFromGitHub {
owner = "Jacalz";
repo = "rymdport";
rev = "v${version}";
hash = "sha256-IBGvlDgpONa04u3DBJ3k8VZbtNs/W5DUHzREFpjIqrs=";
hash = "sha256-nqB4KZdYSTiyIaslFN6ncwJnD8+7ZgHj/SXAa5YAt9k=";
};
vendorHash = "sha256-Q3bUH1EhY63QF646FYwiVXusWPTqI5Am2AVJq+qyNVo=";
vendorHash = "sha256-03qdjeU6u0mBcdWlMhs9ORaeBkPNMO4Auqy/rOFIaVM=";
nativeBuildInputs = [
pkg-config

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "diff-so-fancy";
version = "1.4.3";
version = "1.4.4";
src = fetchFromGitHub {
owner = "so-fancy";
repo = "diff-so-fancy";
rev = "v${version}";
sha256 = "sha256-/xdBvq2u1s5/yzjwr3MLxpaD1CNktcPijXJTKW3Bc4c=";
sha256 = "sha256-yF+LI1lsE1qwOc3u7mtc+uu0N/8m4bZD5qP+xFraaTI=";
};
nativeBuildInputs = [

View file

@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)"
'';
# Parallel build fails due to missing dependencies between private libaries:
# Parallel build fails due to missing dependencies between private libraries:
# ld: cannot find ../libAfterConf/libAfterConf.a: No such file or directory
# Let's disable parallel builds until it's fixed upstream:
# https://github.com/afterstep/afterstep/issues/8

View file

@ -9,12 +9,12 @@
stdenv.mkDerivation (finalAttrs: {
pname = "katriawm";
version = "22.12";
version = "23.04";
src = fetchzip {
name = finalAttrs.pname + "-" + finalAttrs.version;
url = "https://www.uninformativ.de/git/katriawm/archives/katriawm-v${finalAttrs.version}.tar.gz";
hash = "sha256-xFKr4PxqvnQEAWplhRsaL5rhmSJpnImpk1eXFX0N1tc=";
hash = "sha256-Wi9Fv/Ms6t7tr8nxznXrn/6V04lnO1HMz4XFbuCr9+Y=";
};
nativeBuildInputs = [

View file

@ -125,10 +125,10 @@ crate_: lib.makeOverridable
# hello = attrs: { buildInputs = [ openssl ]; };
# }
, crateOverrides
# Rust library dependencies, i.e. other libaries that were built
# Rust library dependencies, i.e. other libraries that were built
# with buildRustCrate.
, dependencies
# Rust build dependencies, i.e. other libaries that were built
# Rust build dependencies, i.e. other libraries that were built
# with buildRustCrate and are used by a build script.
, buildDependencies
# Specify the "extern" name of a library if it differs from the library target.

View file

@ -69,7 +69,7 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
# This fix would not be necessary if ANY of the above were false:
# - If Nix used native headers for each different MacOS version, aligned_alloc
# would be in the headers on Catalina.
# - If Nix used the same libary binaries for each MacOS version, aligned_alloc
# - If Nix used the same library binaries for each MacOS version, aligned_alloc
# would not be in the library binaries.
# - If Catalina did not include aligned_alloc, this wouldn't be a problem.
# - If the configure scripts looked for header presence as well as

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "kotlin";
version = "1.8.21";
version = "1.8.22";
src = fetchurl {
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
sha256 = "1mwggqll6117sw5ldkl1kmlp6mh9z36jhb6r0hnljryhk9bcahvf";
sha256 = "19psrm905r7fli27cn5hykvjhizshpg2xzp1kbkv3pwybki0zxci";
};
propagatedBuildInputs = [ jre ] ;

View file

@ -7,7 +7,7 @@
stdenv.mkDerivation rec {
pname = "kotlin-native";
version = "1.8.21";
version = "1.8.22";
src = let
getArch = {
@ -20,9 +20,9 @@ stdenv.mkDerivation rec {
"https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-native-${arch}-${version}.tar.gz";
getHash = arch: {
"macos-aarch64" = "06sjlwsk1854c6qpxbfqccvcyk4i8dv13jbc7s7lamgd45wrb5qa";
"macos-x86_64" = "1mkzcwya5mjn0hjxmx8givmx9y1v4hy0cqayya20rvk10jngsfz7";
"linux-x86_64" = "1kv81ilp2dzhxx0kbqkl0i43b44vr5dvni607k78vn6n3mj59j0g";
"macos-aarch64" = "05z4jdq52lxhbs0sgv43zbfx8dkl16k04ky578b3raqf4brmm019";
"macos-x86_64" = "03f2nxp8xajpap8fw0fccacs45fp5lcjgy01ygr8yjwsaq96nvhd";
"linux-x86_64" = "12z5jxkdnraivc0in4m9qagca06jiasfnjalk9fpsd0b07y43yx1";
}.${arch};
in
fetchurl {

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "https://github.com/0intro/libixp";
description = "Portable, simple C-language 9P client and server libary";
description = "Portable, simple C-language 9P client and server library";
maintainers = with lib.maintainers; [ kovirobi ];
license = lib.licenses.mit;
platforms = with lib.platforms; unix;

View file

@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DENABLE_STATIC=NO" # Do not build static libraries
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
"-DENABLE_STRICT=NO" # Do not build with -Werror
];
buildInputs = [

View file

@ -11,11 +11,11 @@ assert (ch4backend.pname == "ucx" || ch4backend.pname == "libfabric");
stdenv.mkDerivation rec {
pname = "mpich";
version = "4.1.1";
version = "4.1.2";
src = fetchurl {
url = "https://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz";
sha256 = "sha256-7jBHGzXvh/TIj4caXirTgRzZxN8y/U8ThEMHL/QoTKI=";
sha256 = "sha256-NJLpitq2K1l+8NKS+yRZthI7yABwqKoKML5pYgdaEvA=";
};
configureFlags = [

View file

@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "xeus";
version = "3.0.5";
version = "3.1.1";
src = fetchFromGitHub {
owner = "jupyter-xeus";
repo = pname;
rev = version;
sha256 = "sha256-LeU4PJ1UKfGqkRKq0/Mn9gjwNmXCy0/2SbjWJrjlOyU=";
sha256 = "sha256-jZZe8SegQuFLoH2Qp+etoKELGEWdlYQPXj14DNIMJ/0=";
};
nativeBuildInputs = [

View file

@ -6,14 +6,14 @@
buildPythonPackage rec {
pname = "hdf5plugin";
version = "4.1.1";
version = "4.1.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "silx-kit";
repo = "hdf5plugin";
rev = "refs/tags/v${version}";
hash = "sha256-w3jgIKfJPlu8F2rJXATmbHKyabp3PQLVmCYj3RsYL3c=";
hash = "sha256-ooRZTZaHutr6tdMm8mbpukjmH9yfgWCf5lrFc6AJVpw=";
};
propagatedBuildInputs = [

View file

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "jsbeautifier";
version = "1.14.7";
version = "1.14.8";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-d5kyVNsf9vhOtuHXXjtrcsui7yCBOlhbLYHo5ePHE8Y=";
hash = "sha256-1MTiY6Qt1hlK+52+VHEL48VgRJLL7D6JyS3ZhRP5i58=";
};
propagatedBuildInputs = [
@ -39,6 +39,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "JavaScript unobfuscator and beautifier";
homepage = "http://jsbeautifier.org";
changelog = "https://github.com/beautify-web/js-beautify/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ apeyroux ];
};

View file

@ -76,7 +76,7 @@
buildPythonPackage rec {
pname = "langchain";
version = "0.0.193";
version = "0.0.195";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -85,7 +85,7 @@ buildPythonPackage rec {
owner = "hwchase17";
repo = "langchain";
rev = "refs/tags/v${version}";
hash = "sha256-Qg6kFFPOk+XpLzEl3YSI9I4fPq9KB4UtQf9Khgut7FE=";
hash = "sha256-PUBFAAqCAshUkASsGnFNQ5+Xh6416ISkMqJ0bYcx7WI=";
};
postPatch = ''

View file

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "nunavut";
version = "2.0.9";
version = "2.1.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-SRiM4Vuk2nhETnBclYTeKFsT+5HgAxQe4z27h+lW7HI=";
hash = "sha256-L4FbPhhhmgjkL1c3qnSJDK+4NBO2DUqeW6WGt9MBTbg=";
};
postPatch = ''
@ -50,6 +50,7 @@
authors to generate code, schemas, metadata, documentation, etc.
'';
homepage = "https://nunavut.readthedocs.io/";
changelog = "https://github.com/OpenCyphal/nunavut/releases/tag/${version}";
maintainers = with maintainers; [ wucke13 ];
license = with licenses; [ bsd3 mit ];
};

View file

@ -40,7 +40,7 @@ buildPythonPackage rec {
];
meta = with lib; {
description = "A collection of utilities and processors for the Python Imaging Libary";
description = "A collection of utilities and processors for the Python Imaging Library";
homepage = "https://github.com/matthewwithanm/pilkit/";
license = licenses.bsd0;
maintainers = with maintainers; [ domenkozar ];

View file

@ -1,43 +0,0 @@
{ stdenv, autoPatchelfHook, fetchurl, lib }:
stdenv.mkDerivation rec {
pname = "ccloud-cli";
version = "1.39.0";
# To get the latest version:
# curl -L https://cnfl.io/ccloud-cli | sh -s -- -l | grep -v latest | sort -V | tail -n1
src = fetchurl (if stdenv.hostPlatform.isDarwin then {
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/ccloud-cli/archives/${version}/ccloud_v${version}_darwin_amd64.tar.gz";
sha256 = "0jqpmnx3izl4gv02zpx03z6ayi3cb5if4rnyl1374yaclx44k1gd";
} else {
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/ccloud-cli/archives/${version}/ccloud_v${version}_linux_amd64.tar.gz";
sha256 = "0936hipcl37w4mzzsnjlz4q1z4j9094i4irigzqwg14gdbs7p11s";
});
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
dontStrip = stdenv.isDarwin;
installPhase = ''
mkdir -p $out/{bin,share/doc/ccloud-cli}
cp ccloud $out/bin/
cp LICENSE $out/share/doc/ccloud-cli/
cp -r legal $out/share/doc/ccloud-cli/
'';
meta = with lib; {
description = "Confluent Cloud CLI";
homepage = "https://docs.confluent.io/current/cloud/cli/index.html";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ kalbasit ];
# TODO: There's support for i686 systems but I do not have any such system
# to build it locally on, it's also unfree so I cannot rely on ofborg to
# build it. Get the list of supported system by looking at the list of
# files in the S3 bucket:
#
# https://s3-us-west-2.amazonaws.com/confluent.cloud?prefix=ccloud-cli/archives/1.25.0/&delimiter=/%27
platforms = [ "x86_64-linux" "x86_64-darwin" ];
};
}

View file

@ -2,16 +2,16 @@
stdenv.mkDerivation rec {
pname = "confluent-cli";
version = "2.4.0";
version = "3.17.0";
# To get the latest version:
# curl -L https://cnfl.io/cli | sh -s -- -l | grep -v latest | sort -V | tail -n1
src = fetchurl (if stdenv.hostPlatform.isDarwin then {
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_v${version}_darwin_amd64.tar.gz";
sha256 = "1xkf7p9cn37k8j57cgbzxhqgnmchf86jyiza91bf6ddvm6jsm2gd";
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_${version}_darwin_amd64.tar.gz";
sha256 = "03104736f65591a5be9536424460d9b8c8fc8ac8b5eb646e832371397aaf7cef";
} else {
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_v${version}_linux_amd64.tar.gz";
sha256 = "1wvy7x56cc7imycf0d83mxcqzdvv56cc0zbp913xgghjn9dl2z7a";
url = "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/${version}/confluent_${version}_linux_amd64.tar.gz";
sha256 = "3243beca4fefd49cf067f9a4df4f5072a8ac5dac91638e9f10ef0b0544d30445";
});
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "mani";
version = "0.24.0";
version = "0.25.0";
src = fetchFromGitHub {
owner = "alajmo";
repo = "mani";
rev = "v${version}";
sha256 = "sha256-ROFqeRa43qDjO+xwC68gJJqLeLSRiX+L/gf2o8kURaI=";
sha256 = "sha256-TqxoU2g4ZegJGHrnNO+ivPu209NDFcLnxpHGj8pOA4E=";
};
vendorHash = "sha256-mFan09oJ+BPVJHAxoROj282WJ+4e7TD0ZqeQH1kDabQ=";

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "micronaut";
version = "3.9.2";
version = "3.9.3";
src = fetchzip {
url = "https://github.com/micronaut-projects/micronaut-starter/releases/download/v${version}/micronaut-cli-${version}.zip";
sha256 = "sha256-LhNpkCOWgFmzGml4weIpUCHPREcDXlstSzyMZz0tBo8=";
sha256 = "sha256-ImpgmMlEZSBXCqbd8g269uE6uBicLzjQjRvcAXn9QYI=";
};
nativeBuildInputs = [ makeWrapper installShellFiles ];

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
pname = "opengrok";
version = "1.12.9";
version = "1.12.11";
# binary distribution
src = fetchurl {
url = "https://github.com/oracle/opengrok/releases/download/${version}/${pname}-${version}.tar.gz";
hash = "sha256-8VyCMFFL85qqnkO66qobB0OzF8DWfpjkc8Jxbp8FtH0=";
hash = "sha256-cJfBv1I8zw9Qtn9APb7+JbSahrzYYI8dkFM8fMnDVl0=";
};
nativeBuildInputs = [ makeWrapper ];

View file

@ -11,13 +11,13 @@ assert enableWasmEval && stdenv.isDarwin -> builtins.throw "building with wasm o
buildGoModule rec {
pname = "open-policy-agent";
version = "0.53.0";
version = "0.53.1";
src = fetchFromGitHub {
owner = "open-policy-agent";
repo = "opa";
rev = "v${version}";
hash = "sha256-HfQkd0Vl48zGMTXHJoTfVLV/OHHC+T6gcA6pcewhFJU=";
hash = "sha256-FKBrvg9uZ93dOM+LLWA1Ae7uBMiux5l355n5r8UjBbg=";
};
vendorHash = null;

View file

@ -10,7 +10,7 @@ let
meta = rust-bindgen-unwrapped.meta // {
longDescription = rust-bindgen-unwrapped.meta.longDescription + ''
This version of bindgen is wrapped with the required compiler flags
required to find the c and c++ standard libary, as well as the libraries
required to find the c and c++ standard library, as well as the libraries
specified in the buildInputs of your derivation.
'';
};

View file

@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec {
'';
meta = with lib; {
description = "A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries";
description = "A cargo subcommand to build and install C-ABI compatible dynamic and static libraries";
longDescription = ''
Cargo C-ABI helpers. A cargo applet that produces and installs a correct
pkg-config file, a static library and a dynamic library, and a C header

View file

@ -0,0 +1,25 @@
{ stdenv, lib, fetchFromGitHub, cmake, lksctp-tools, sctpSupport ? true }:
stdenv.mkDerivation (finalAttrs: {
pname = "cannelloni";
version = "1.1.0";
src = fetchFromGitHub {
owner = "mguentner";
repo = "cannelloni";
rev = "v${finalAttrs.version}";
hash = "sha256-pAXHo9NCXMFKYcIJogytBiPkQE0nK6chU5TKiDNCKA8=";
};
buildInputs = [ cmake ] ++ lib.optionals sctpSupport [ lksctp-tools ];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DSCTP_SUPPORT=${lib.boolToString sctpSupport}"
];
meta = with lib; {
description = "A SocketCAN over Ethernet tunnel";
homepage = "https://github.com/mguentner/cannelloni";
platforms = platforms.linux;
license = licenses.gpl2Only;
maintainers = [ maintainers.samw ];
};
})

View file

@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
pname = "linuxptp";
version = "3.1.1";
version = "4.0";
src = fetchurl {
url = "mirror://sourceforge/linuxptp/${pname}-${version}.tgz";
sha256 = "1nf0w4xyzg884v8blb81zkk6q8p6zbiq9lx61jdqwbbzkdgqbmll";
hash = "sha256-0n1e8pa7PSheIuafda4CO0tCovRlUTDW05DYr8vD2TM=";
};
postPatch = ''

View file

@ -51,6 +51,13 @@ lib.makeScope
tinycc = tinycc-mes;
};
heirloom = callPackage ./heirloom {
bash = bash_2_05;
tinycc = tinycc-mes;
};
heirloom-devtools = callPackage ./heirloom-devtools { tinycc = tinycc-mes; };
ln-boot = callPackage ./ln-boot { };
mes = lib.recurseIntoAttrs (callPackage ./mes { });
@ -73,6 +80,7 @@ lib.makeScope
echo ${gnused.tests.get-version}
echo ${gnutar.tests.get-version}
echo ${gzip.tests.get-version}
echo ${heirloom.tests.get-version}
echo ${mes.compiler.tests.get-version}
echo ${tinycc-mes.compiler.tests.chain}
mkdir ''${out}

View file

@ -0,0 +1,97 @@
{ lib
, fetchurl
, kaem
, tinycc
, gnumake
, gnupatch
, coreutils
}:
let
pname = "heirloom-devtools";
version = "070527";
src = fetchurl {
url = "mirror://sourceforge/heirloom/heirloom-devtools/heirloom-devtools-${version}.tar.bz2";
sha256 = "9f233d8b78e4351fe9dd2d50d83958a0e5af36f54e9818521458a08e058691ba";
};
# Thanks to the live-bootstrap project!
# See https://github.com/fosslinux/live-bootstrap/blob/d918b984ad6fe4fc7680f3be060fd82f8c9fddd9/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem
liveBootstrap = "https://github.com/fosslinux/live-bootstrap/raw/d918b984ad6fe4fc7680f3be060fd82f8c9fddd9/sysa/heirloom-devtools-070527";
patches = [
# Remove all kinds of wchar support. Mes Libc does not support wchar in any form
(fetchurl {
url = "${liveBootstrap}/patches/yacc_remove_wchar.patch";
sha256 = "0wgiz02bb7xzjy2gnbjp8y31qy6rc4b29v01zi32zh9lw54j68hc";
})
# Similarly to yacc, remove wchar. See yacc patch for further information
(fetchurl {
url = "${liveBootstrap}/patches/lex_remove_wchar.patch";
sha256 = "168dfngi51ljjqgd55wbvmffaq61gk48gak50ymnl1br92qkp4zh";
})
];
in
kaem.runCommand "${pname}-${version}" {
inherit pname version;
nativeBuildInputs = [
tinycc.compiler
gnumake
gnupatch
coreutils
];
meta = with lib; {
description = "Portable yacc and lex derived from OpenSolaris";
homepage = "https://heirloom.sourceforge.net/devtools.html";
license = with licenses; [ cddl bsdOriginalUC caldera ];
maintainers = teams.minimal-bootstrap.members;
platforms = platforms.unix;
};
} ''
# Unpack
unbz2 --file ${src} --output heirloom-devtools.tar
untar --file heirloom-devtools.tar
rm heirloom-devtools.tar
build=''${NIX_BUILD_TOP}/heirloom-devtools-${version}
cd ''${build}
# Patch
${lib.concatLines (map (f: "patch -Np0 -i ${f}") patches)}
# Build yacc
cd yacc
make -f Makefile.mk \
CC="tcc -B ${tinycc.libs}/lib" \
AR="tcc -ar" \
CFLAGS="-DMAXPATHLEN=4096 -DEILSEQ=84 -DMB_LEN_MAX=100" \
LDFLAGS="-lgetopt" \
RANLIB=true \
LIBDIR=''${out}/lib
# Install yacc
install -D yacc ''${out}/bin/yacc
install -Dm 444 liby.a ''${out}/lib/liby.a
install -Dm 444 yaccpar ''${out}/lib/yaccpar
# Make yacc available to lex
PATH="''${out}/bin:''${PATH}"
# Build lex
cd ../lex
make -f Makefile.mk \
CC="tcc -B ${tinycc.libs}/lib" \
AR="tcc -ar" \
CFLAGS="-DEILSEQ=84 -DMB_LEN_MAX=100" \
LDFLAGS="-lgetopt" \
RANLIB=true \
LIBDIR=''${out}/lib
# Install lex
install -D lex ''${out}/bin/lex
install -Dm 444 ncform ''${out}/lib/lex/ncform
install -Dm 444 nceucform ''${out}/lib/lex/nceucform
install -Dm 444 nrform ''${out}/lib/lex/nrform
install -Dm 444 libl.a ''${out}/lib/libl.a
''

View file

@ -0,0 +1,84 @@
--- cp/cp.c
+++ cp/cp.c
@@ -42,8 +42,6 @@ static const char sccsid[] USED = "@(#)cp.sl 1.84 (gritter) 3/4/06";
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/socket.h>
-#include <sys/un.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <fcntl.h>
@@ -427,6 +425,7 @@ fdcopy(const char *src, const struct stat *ssp, const int sfd,
#endif
#ifdef __linux__
+#ifdef O_DIRECT
if (!bflag && !Dflag && ssp->st_size > 0) {
long long sent;
@@ -436,6 +435,7 @@ fdcopy(const char *src, const struct stat *ssp, const int sfd,
if (sent < 0)
goto err;
}
+#endif
#endif /* __linux__ */
if (pagesize == 0)
if ((pagesize = 4096) < 0)
@@ -702,37 +702,6 @@ symlinkcopy(const char *src, const struct stat *ssp,
}
}
-static void
-socketcopy(const char *src, const struct stat *ssp,
- const char *tgt, const struct stat *dsp)
-{
- int fd, addrsz;
- struct sockaddr_un addr;
- size_t len;
-
- if (do_unlink(tgt, dsp) != OKAY)
- return;
- len = strlen(tgt);
- memset(&addr, 0, sizeof addr);
- addr.sun_family = AF_UNIX;
- addrsz = sizeof addr - sizeof addr.sun_path + len;
- if ((len >= sizeof addr.sun_path ? errno = ENAMETOOLONG, fd = -1, 1 :
- (strncpy(addr.sun_path,tgt,sizeof addr.sun_path), 0)) ||
- (fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0 ||
- bind(fd, (struct sockaddr *)&addr, addrsz) < 0) {
- fprintf(stderr, "%s: cannot create socket %s\n%s: %s\n",
- progname, tgt,
- progname, strerror(errno));
- if (fd >= 0)
- close(fd);
- errcnt |= 01;
- return;
- }
- close(fd);
- if (pflag)
- permissions(tgt, ssp);
-}
-
static void
specialcopy(const char *src, const struct stat *ssp,
const char *tgt, const struct stat *dsp)
@@ -748,9 +717,6 @@ specialcopy(const char *src, const struct stat *ssp,
case S_IFLNK:
symlinkcopy(src, ssp, tgt, dsp);
break;
- case S_IFSOCK:
- socketcopy(src, ssp, tgt, dsp);
- break;
case S_IFDOOR:
ignoring("door", src);
break;
@@ -1043,7 +1009,7 @@ ln(const char *src, const char *tgt, struct stat *dsp, int level,
errcnt |= 01;
return;
}
-#if (defined (SUS) || defined (S42)) && (defined (__linux__) || defined (__sun))
+#if (defined (SUS) || defined (S42)) && (defined (__linux__) || defined (__sun)) && !defined (__TINYC__)
if (sflag == 0) {
char *rpbuf = alloca(PATH_MAX+1);
if (realpath(src, rpbuf) == NULL) {

View file

@ -0,0 +1,130 @@
{ lib
, fetchurl
, bash
, tinycc
, gnumake
, gnupatch
, heirloom-devtools
, heirloom
}:
let
pname = "heirloom";
version = "070715";
src = fetchurl {
url = "mirror://sourceforge/heirloom/heirloom/${version}/heirloom-${version}.tar.bz2";
sha256 = "sha256-6zP3C8wBmx0OCkHx11UtRcV6FicuThxIY07D5ESWow8=";
};
patches = [
# we pre-generate nawk's proctab.c as meslibc is not capable of running maketab
# during build time (insufficient sscanf support)
./proctab.patch
# disable utilities that don't build successfully
./disable-programs.patch
# "tcc -ar" doesn't support creating empty archives
./tcc-empty-ar.patch
# meslibc doesn't have seperate libm
./dont-link-lm.patch
# meslibc's vprintf doesn't support %ll
./vprintf.patch
# meslibc doesn't support sysconf()
./sysconf.patch
# meslibc doesn't support locale
./strcoll.patch
# meslibc doesn't support termios.h
./termios.patch
# meslibc doesn't support utime.h
./utime.patch
# meslibc doesn't support langinfo.h
./langinfo.patch
# support building with meslibc
./meslibc-support.patch
# remove socket functionality as unsupported by meslibc
./cp-no-socket.patch
];
makeFlags = [
# mk.config build options
"CC='tcc -B ${tinycc.libs}/lib -include ${./stubs.h} -include ${./musl.h}'"
"AR='tcc -ar'"
"RANLIB=true"
"STRIP=true"
"SHELL=${bash}/bin/sh"
"POSIX_SHELL=${bash}/bin/sh"
"DEFBIN=/bin"
"SV3BIN=/5bin"
"S42BIN=/5bin/s42"
"SUSBIN=/bin"
"SU3BIN=/5bin/posix2001"
"UCBBIN=/ucb"
"CCSBIN=/ccs/bin"
"DEFLIB=/lib"
"DEFSBIN=/bin"
"MANDIR=/share/man"
"LCURS=" # disable ncurses
"USE_ZLIB=0" # disable zlib
"IWCHAR='-I../libwchar'"
"LWCHAR='-L../libwchar -lwchar'"
];
in
bash.runCommand "${pname}-${version}" {
inherit pname version;
nativeBuildInputs = [
tinycc.compiler
gnumake
gnupatch
heirloom-devtools
];
passthru.sed =
bash.runCommand "${pname}-sed-${version}" {} ''
install -D ${heirloom}/bin/sed $out/bin/sed
'';
passthru.tests.get-version = result:
bash.runCommand "${pname}-get-version-${version}" {} ''
${result}/bin/banner Hello Heirloom
mkdir $out
'';
meta = with lib; {
description = "The Heirloom Toolchest is a collection of standard Unix utilities";
homepage = "https://heirloom.sourceforge.net/tools.html";
license = with licenses; [
# All licenses according to LICENSE/
zlib
caldera
bsdOriginalUC
cddl
bsd3
gpl2Plus
lgpl21Plus
lpl-102
info-zip
];
maintainers = teams.minimal-bootstrap.members;
platforms = platforms.unix;
};
} ''
# Unpack
unbz2 --file ${src} --output heirloom.tar
untar --file heirloom.tar
rm heirloom.tar
cd heirloom-${version}
# Patch
${lib.concatMapStringsSep "\n" (f: "patch -Np0 -i ${f}") patches}
cp ${./proctab.c} nawk/proctab.c
# Build
# These tools are required during later build steps
export PATH="$PATH:$PWD/ed:$PWD/nawk:$PWD/sed"
make ${lib.concatStringsSep " " makeFlags}
# Install
make install ROOT=$out ${lib.concatStringsSep " " makeFlags}
''

View file

@ -0,0 +1,43 @@
--- makefile
+++ makefile
@@ -1,21 +1,24 @@
-SHELL = /bin/sh
+SHELL = sh
-SUBDIRS = build libwchar libcommon libuxre _install \
- banner basename bc bdiff bfs \
- cal calendar cat chmod chown \
- cksum cmp col comm copy cp cpio csplit cut \
- date dc dd deroff diff diff3 dircmp dirname df du \
+SUBDIRS = libwchar libcommon libuxre _install \
+ banner basename bdiff bfs \
+ cat chmod chown \
+ cksum cmp col comm copy cp csplit cut \
+ dc dirname \
echo ed env expand expr \
- factor file find fmt fmtmsg fold \
- getconf getopt grep groups hd head hostname id join \
- kill line listusers ln logins logname ls \
- mail man mesg mkdir mkfifo mknod more mvdir \
- nawk news nice nl nohup oawk od \
- paste pathchk pg pgrep pr printenv printf priocntl ps psrinfo pwd \
- random renice rm rmdir \
- sdiff sed setpgrp shl sleep sort spell split stty su sum sync \
- tabs tail tapecntl tar tcopy tee test time touch tr true tsort tty \
- ul uname uniq units users wc what who whoami whodo xargs yes
+ file fmt fold \
+ getopt grep hd head join \
+ kill line ln logname ls \
+ mesg mkdir mknod \
+ nl nohup od \
+ paste pathchk pgrep pr printenv printf pwd \
+ random rm rmdir \
+ sed sleep sort split sum \
+ tee test touch tr true tsort tty \
+ uniq units wc what whoami xargs yes
+
+# These depend on some coreutils that we need to build first
+SUBDIRS += bc nawk build
dummy: makefiles all

View file

@ -0,0 +1,44 @@
--- csplit/Makefile.mk
+++ csplit/Makefile.mk
@@ -1,19 +1,19 @@
all: csplit csplit_sus csplit_su3
csplit: csplit.o
- $(LD) $(LDFLAGS) csplit.o $(LCOMMON) $(LWCHAR) $(LIBS) -lm -o csplit
+ $(LD) $(LDFLAGS) csplit.o $(LCOMMON) $(LWCHAR) $(LIBS) -o csplit
csplit.o: csplit.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(XO6FL) $(LARGEF) $(IWCHAR) $(ICOMMON) -c csplit.c
csplit_sus: csplit_sus.o
- $(LD) $(LDFLAGS) csplit_sus.o $(LUXRE) $(LCOMMON) $(LWCHAR) $(LIBS) -lm -o csplit_sus
+ $(LD) $(LDFLAGS) csplit_sus.o $(LUXRE) $(LCOMMON) $(LWCHAR) $(LIBS) -o csplit_sus
csplit_sus.o: csplit.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(XO6FL) $(LARGEF) $(IUXRE) $(IWCHAR) $(ICOMMON) -DSUS -c csplit.c -o csplit_sus.o
csplit_su3: csplit_su3.o
- $(LD) $(LDFLAGS) csplit_su3.o $(LUXRE) $(LCOMMON) $(LWCHAR) $(LIBS) -lm -o csplit_su3
+ $(LD) $(LDFLAGS) csplit_su3.o $(LUXRE) $(LCOMMON) $(LWCHAR) $(LIBS) -o csplit_su3
csplit_su3.o: csplit.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(XO6FL) $(LARGEF) $(IUXRE) $(IWCHAR) $(ICOMMON) -DSU3 -c csplit.c -o csplit_su3.o
--- nawk/Makefile.mk
+++ nawk/Makefile.mk
@@ -3,13 +3,13 @@ all: awk awk_sus awk_su3
OBJ = awk.lx.o b.o lib.o main.o parse.o proctab.o run.o tran.o
awk: awk.g.o $(OBJ) version.o
- $(LD) $(LDFLAGS) awk.g.o $(OBJ) version.o $(LUXRE) -lm $(LCOMMON) $(LWCHAR) $(LIBS) -o awk
+ $(LD) $(LDFLAGS) awk.g.o $(OBJ) version.o $(LUXRE) $(LCOMMON) $(LWCHAR) $(LIBS) -o awk
awk_sus: awk.g.o $(OBJ) version_sus.o
- $(LD) $(LDFLAGS) awk.g.o $(OBJ) version_sus.o $(LUXRE) -lm $(LCOMMON) $(LWCHAR) $(LIBS) -o awk_sus
+ $(LD) $(LDFLAGS) awk.g.o $(OBJ) version_sus.o $(LUXRE) $(LCOMMON) $(LWCHAR) $(LIBS) -o awk_sus
awk_su3: awk.g.2001.o $(OBJ) version_su3.o
- $(LD) $(LDFLAGS) awk.g.2001.o $(OBJ) version_su3.o $(LUXRE) -lm $(LCOMMON) $(LWCHAR) $(LIBS) -o awk_su3
+ $(LD) $(LDFLAGS) awk.g.2001.o $(OBJ) version_su3.o $(LUXRE) $(LCOMMON) $(LWCHAR) $(LIBS) -o awk_su3
awk.g.c: awk.g.y
$(YACC) -d awk.g.y

View file

@ -0,0 +1,99 @@
--- nawk/main.c
+++ nawk/main.c
@@ -35,7 +35,6 @@
#include <errno.h>
#include <string.h>
#include <locale.h>
-#include <langinfo.h>
#include <libgen.h>
#define CMDCLASS ""/*"UX:"*/ /* Command classification */
--- sort/sort.c
+++ sort/sort.c
@@ -63,7 +63,6 @@ static const char sccsid[] USED = "@(#)sort.sl 1.37 (gritter) 5/29/05";
#include <locale.h>
#include <wchar.h>
#include <wctype.h>
-#include <langinfo.h>
#include <inttypes.h>
#include <errno.h>
@@ -287,18 +286,6 @@ main(int argc, char **argv)
else
chkblank();
compare = cmpf = ccoll ? mb_cur_max > 1 ? cmpm : cmpa : cmpl;
- setlocale(LC_NUMERIC, "");
- arg = nl_langinfo(RADIXCHAR);
- if (mb_cur_max > 1)
- next(radixchar, arg, i);
- else
- radixchar = *arg & 0377;
- arg = nl_langinfo(THOUSEP);
- if (mb_cur_max > 1)
- next(thousep, arg, i);
- else
- thousep = *arg & 0377;
- setlocale(LC_TIME, "");
fields = smalloc(NF * sizeof *fields);
copyproto();
eargv = argv;
@@ -1088,8 +1075,7 @@ cmp(const char *i, const char *j)
} else {
sa = elicpy(collba, pa, la, '\n', ignore, code);
sb = elicpy(collbb, pb, lb, '\n', ignore, code);
- n = fp->Mflg ? monthcmp(collba, collbb) :
- strcoll(collba, collbb);
+ n = strcmp(collba, collbb);
if (n)
return n > 0 ? -fp->rflg : fp->rflg;
pa = &pa[sa];
@@ -1570,49 +1556,6 @@ upcdup(const char *s)
return r;
}
-static const char *months[12];
-
-#define COPY_ABMON(m) months[m-1] = upcdup(nl_langinfo(ABMON_##m))
-
-static void
-fillmonths(void)
-{
- COPY_ABMON(1);
- COPY_ABMON(2);
- COPY_ABMON(3);
- COPY_ABMON(4);
- COPY_ABMON(5);
- COPY_ABMON(6);
- COPY_ABMON(7);
- COPY_ABMON(8);
- COPY_ABMON(9);
- COPY_ABMON(10);
- COPY_ABMON(11);
- COPY_ABMON(12);
-}
-
-static int
-monthcoll(const char *s)
-{
- int i;
- char u[MB_LEN_MAX*3+1];
-
- cpcu3(u, s);
- for (i = 0; i < 12; i++)
- if (strcmp(u, months[i]) == 0)
- return i;
- return 0;
-}
-
-
-static int
-monthcmp(const char *pa, const char *pb)
-{
- if (months[0] == NULL)
- fillmonths();
- return monthcoll(pa) - monthcoll(pb);
-}
-
/*
* isblank() consumes half of execution time (in skip()) with
* glibc 2.3.1. Check if it contains only space and tab, and

View file

@ -0,0 +1,322 @@
--- _install/install_ucb.c
+++ _install/install_ucb.c
@@ -267,7 +267,7 @@ cp(const char *src, const char *tgt, struct stat *dsp)
if (check(src, tgt, dsp, &sst) != OKAY)
return;
unlink(tgt);
- if ((dfd = creat(tgt, 0700)) < 0 || fchmod(dfd, 0700) < 0 ||
+ if ((dfd = creat(tgt, 0700)) < 0 || chmod(tgt, 0700) < 0 ||
fstat(dfd, &nst) < 0) {
fprintf(stderr, "%s: %s: %s\n", progname, src,
strerror(errno));
--- libcommon/Makefile.mk
+++ libcommon/Makefile.mk
@@ -15,7 +15,7 @@ CHECK: CHECK.c
headers: CHECK
one() { \
rm -f "$$1.h"; \
- if grep "$$1_h[ ]*=[ ]*[^0][ ]*;" CHECK >/dev/null; \
+ if true; \
then \
ln -s "_$$1.h" "$$1.h"; \
fi; \
--- libcommon/atoll.h
+++ libcommon/atoll.h
@@ -1,8 +1,10 @@
/* Sccsid @(#)atoll.h 1.4 (gritter) 7/18/04 */
#if defined (__hpux) || defined (_AIX) || \
- defined (__FreeBSD__) && (__FreeBSD__) < 5
+ (defined (__FreeBSD__) && (__FreeBSD__) < 5) || defined (__TINYC__)
+#ifndef __TINYC__
extern long long strtoll(const char *nptr, char **endptr, int base);
extern unsigned long long strtoull(const char *nptr, char **endptr, int base);
+#endif
extern long long atoll(const char *nptr);
#endif /* __hpux || _AIX || __FreeBSD__ < 5 */
--- libcommon/blank.h
+++ libcommon/blank.h
@@ -5,7 +5,7 @@
*/
/* Sccsid @(#)blank.h 1.3 (gritter) 5/1/04 */
-#ifndef __dietlibc__
+#if !defined(__dietlibc__) && !defined(__TINYC__)
#ifndef LIBCOMMON_BLANK_H
#define LIBCOMMON_BLANK_H 1
--- libcommon/getdir.c
+++ libcommon/getdir.c
@@ -52,7 +52,7 @@ extern int getdents(int, struct dirent *, size_t);
#undef d_ino
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__
|| __APPLE__ */
-#elif defined (__dietlibc__)
+#elif defined (__dietlibc__) || defined(__TINYC__)
#include <dirent.h>
#include <unistd.h>
#else /* !__GLIBC__, !__dietlibc__ */
--- libcommon/memalign.c
+++ libcommon/memalign.c
@@ -23,7 +23,7 @@
#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (_AIX) || \
defined (__NetBSD__) || defined (__OpenBSD__) || \
- defined (__DragonFly__) || defined (__APPLE__)
+ defined (__DragonFly__) || defined (__APPLE__) || defined(__TINYC__)
/*
* FreeBSD malloc(3) promises to page-align the return of malloc() calls
* if size is at least a page. This serves for a poor man's memalign()
--- libcommon/memalign.h
+++ libcommon/memalign.h
@@ -26,7 +26,7 @@
#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (_AIX) || \
defined (__NetBSD__) || defined (__OpenBSD__) || \
- defined (__DragonFly__) || defined (__APPLE__)
+ defined (__DragonFly__) || defined (__APPLE__) || defined(__TINYC__)
#include <stdlib.h>
extern void *memalign(size_t, size_t);
--- libcommon/pathconf.c
+++ libcommon/pathconf.c
@@ -21,7 +21,7 @@
*/
/* Sccsid @(#)pathconf.c 1.2 (gritter) 5/1/04 */
-#ifdef __dietlibc__
+#if defined(__dietlibc__) || defined(__TINYC__)
#include <unistd.h>
#include "pathconf.h"
--- libcommon/pathconf.h
+++ libcommon/pathconf.h
@@ -21,7 +21,7 @@
*/
/* Sccsid @(#)pathconf.h 1.2 (gritter) 5/1/04 */
-#ifdef __dietlibc__
+#if defined(__dietlibc__) || defined(__TINYC__)
#include <unistd.h>
extern long fpathconf(int, int);
--- libcommon/regexp.h
+++ libcommon/regexp.h
@@ -47,7 +47,7 @@
static const char regexp_h_sccsid[] REGEXP_H_USED =
"@(#)regexp.sl 1.56 (gritter) 5/29/05";
-#if !defined (REGEXP_H_USED_FROM_VI) && !defined (__dietlibc__)
+#if !defined (REGEXP_H_USED_FROM_VI) && !defined (__dietlibc__) && !defined (__TINYC__)
#define REGEXP_H_WCHARS
#endif
--- libcommon/sfile.c
+++ libcommon/sfile.c
@@ -21,7 +21,7 @@
*/
/* Sccsid @(#)sfile.c 1.9 (gritter) 6/7/04 */
-#ifdef __linux__
+#if defined(__linux__) && !defined(__TINYC__)
#undef _FILE_OFFSET_BITS
#include <sys/types.h>
--- libcommon/sighold.c
+++ libcommon/sighold.c
@@ -22,7 +22,7 @@
/* Sccsid @(#)sighold.c 1.7 (gritter) 1/22/06 */
#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \
- defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__)
+ defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || defined (__TINYC__)
#include <signal.h>
#include "sigset.h"
--- libcommon/sigignore.c
+++ libcommon/sigignore.c
@@ -22,7 +22,7 @@
/* Sccsid @(#)sigignore.c 1.6 (gritter) 1/22/06 */
#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \
- defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__)
+ defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || defined (__TINYC__)
#include <signal.h>
#include "sigset.h"
--- libcommon/sigpause.c
+++ libcommon/sigpause.c
@@ -22,7 +22,7 @@
/* Sccsid @(#)sigpause.c 1.6 (gritter) 1/22/06 */
#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \
- defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__)
+ defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || defined (__TINYC__)
#include <signal.h>
#include "sigset.h"
--- libcommon/sigrelse.c
+++ libcommon/sigrelse.c
@@ -22,7 +22,7 @@
/* Sccsid @(#)sigrelse.c 1.8 (gritter) 1/22/06 */
#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \
- defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__)
+ defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || defined (__TINYC__)
#include <signal.h>
#include "sigset.h"
--- libcommon/sigset.c
+++ libcommon/sigset.c
@@ -22,7 +22,7 @@
/* Sccsid @(#)sigset.c 1.7 (gritter) 1/22/06 */
#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \
- defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__)
+ defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || defined (__TINYC__)
#include <signal.h>
#include "sigset.h"
@@ -46,10 +46,7 @@ void (*sigset(int sig, void (*func)(int)))(int)
if (sigaction(sig, func==SIG_HOLD?(struct sigaction *)0:&nact, &oact)
== -1)
return SIG_ERR;
- if (sigismember(&oset, sig))
- return SIG_HOLD;
- else
- return (oact.sa_handler);
+ return (oact.sa_handler);
}
#endif /* __FreeBSD__ || __dietlibc__ || __NetBSD__ || __OpenBSD__ ||
__DragonFly__ || __APPLE__ */
--- libcommon/sigset.h
+++ libcommon/sigset.h
@@ -22,7 +22,7 @@
/* Sccsid @(#)sigset.h 1.9 (gritter) 1/22/06 */
#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \
- defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__)
+ defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || defined (__TINYC__)
#ifndef SIG_HOLD
#define SIG_HOLD ((void (*)(int))2)
--- libcommon/strtol.c
+++ libcommon/strtol.c
@@ -1,7 +1,7 @@
/* Sccsid @(#)strtol.c 1.6 (gritter) 7/18/04 */
#if defined (__hpux) || defined (_AIX) || \
- defined (__FreeBSD__) && (__FreeBSD__) < 5
+ (defined (__FreeBSD__) && (__FreeBSD__) < 5) || defined (__TINYC__)
#include <stdlib.h>
#include <ctype.h>
@@ -97,6 +97,7 @@ out: if (pp <= bptr) {
return v * sign;
}
+#ifndef __TINYC__
long long
strtoll(const char *nptr, char **endptr, int base)
{
@@ -108,6 +109,7 @@ strtoull(const char *nptr, char **endptr, int base)
{
return (unsigned long long)internal(nptr, endptr, base, 3);
}
+#endif
long long
atoll(const char *nptr)
--- nawk/awk.h
+++ nawk/awk.h
@@ -156,7 +156,6 @@ extern Cell *rlengthloc; /* RLENGTH */
#endif
#ifndef IN_MAKETAB
-#include <wchar.h>
/*
* Get next character from string s and store it in wc; n is set to
--- nawk/awk.lx.l
+++ nawk/awk.lx.l
@@ -71,7 +71,6 @@
#include "awk.h"
#include "y.tab.h"
-#include <pfmt.h>
#include <unistd.h>
static void awk_unputstr(const char *s);
--- nawk/run.c
+++ nawk/run.c
@@ -1467,14 +1467,6 @@ Cell *bltin(Node **a, int n)
case FRAND:
u = (Awkfloat) (rand() % 32767) / 32767.0;
break;
- case FSRAND:
- u = saved_srand; /* return previous seed */
- if (x->tval & REC) /* no argument provided */
- saved_srand = time(NULL);
- else
- saved_srand = getfval(x);
- srand((int) saved_srand);
- break;
case FTOUPPER:
case FTOLOWER:
p = getsval(x);
--- pgrep/pgrep.c
+++ pgrep/pgrep.c
@@ -214,7 +214,7 @@ chdir_to_proc(void)
fprintf(stderr, "%s: cannot open %s\n", progname, PROCDIR);
exit(3);
}
- if (fchdir(fd) < 0) {
+ if (chdir(PROCDIR) < 0) {
fprintf(stderr, "%s: cannot chdir to %s\n", progname, PROCDIR);
exit(3);
}
--- rm/rm.c
+++ rm/rm.c
@@ -242,7 +242,7 @@ rm(size_t pend, const char *base, const int olddir, int ssub, int level)
}
return;
}
- if (fchdir(df) < 0) {
+ if (chdir(base) < 0) {
if (rmfile(base, &st) < 0) {
fprintf(stderr,
"%s: cannot chdir to %s\n",
@@ -270,7 +270,7 @@ rm(size_t pend, const char *base, const int olddir, int ssub, int level)
progname, path);
errcnt |= 4;
}
- if (olddir >= 0 && fchdir(olddir) < 0) {
+ if (olddir >= 0) {
fprintf(stderr, "%s: cannot change backwards\n",
progname);
exit(1);
@@ -316,24 +316,6 @@ subproc(size_t pend, const char *base, int level)
int status;
while (waitpid(pid, &status, 0) != pid);
- if (status && WIFSIGNALED(status)) {
- /*
- * If the signal was sent due to a tty keypress,
- * we should be terminated automatically and
- * never reach this point. Otherwise, we terminate
- * with the same signal, but make sure that we do
- * not overwrite a possibly generated core file.
- * This results in nearly the usual behavior except
- * that the shell never prints a 'core dumped'
- * message.
- */
- struct rlimit rl;
-
- rl.rlim_cur = rl.rlim_max = 0;
- setrlimit(RLIMIT_CORE, &rl);
- raise(WTERMSIG(status));
- pause();
- }
return status ? WEXITSTATUS(status) : 0;
}
case -1:

View file

@ -0,0 +1,53 @@
/*
Copyright © 2005-2019 Rich Felker, et al.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Additional utilities from musl 1.1.24
// include/stdlib.h
#define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
#define WTERMSIG(s) ((s) & 0x7f)
#define WIFEXITED(s) (!WTERMSIG(s))
#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)
// include/sys/sysmacros.h
#define major(x) \
((unsigned)( (((x)>>31>>1) & 0xfffff000) | (((x)>>8) & 0x00000fff) ))
#define minor(x) \
((unsigned)( (((x)>>12) & 0xffffff00) | ((x) & 0x000000ff) ))
#define makedev(x,y) ( \
(((x)&0xfffff000ULL) << 32) | \
(((x)&0x00000fffULL) << 8) | \
(((y)&0xffffff00ULL) << 12) | \
(((y)&0x000000ffULL)) )
// src/misc/basename.c
#include <string.h>
char *basename(char *s)
{
size_t i;
if (!s || !*s) return ".";
i = strlen(s)-1;
for (; i&&s[i]=='/'; i--) s[i] = 0;
for (; i&&s[i-1]!='/'; i--);
return s+i;
}

View file

@ -0,0 +1,205 @@
#include <stdio.h>
#include "awk.h"
#include "y.tab.h"
static unsigned char *printname[92] = {
(unsigned char *) "FIRSTTOKEN", /* 258 */
(unsigned char *) "PROGRAM", /* 259 */
(unsigned char *) "PASTAT", /* 260 */
(unsigned char *) "PASTAT2", /* 261 */
(unsigned char *) "XBEGIN", /* 262 */
(unsigned char *) "XEND", /* 263 */
(unsigned char *) "NL", /* 264 */
(unsigned char *) "ARRAY", /* 265 */
(unsigned char *) "MATCH", /* 266 */
(unsigned char *) "NOTMATCH", /* 267 */
(unsigned char *) "MATCHOP", /* 268 */
(unsigned char *) "FINAL", /* 269 */
(unsigned char *) "DOT", /* 270 */
(unsigned char *) "ALL", /* 271 */
(unsigned char *) "CCL", /* 272 */
(unsigned char *) "NCCL", /* 273 */
(unsigned char *) "CHAR", /* 274 */
(unsigned char *) "MCHAR", /* 275 */
(unsigned char *) "OR", /* 276 */
(unsigned char *) "STAR", /* 277 */
(unsigned char *) "QUEST", /* 278 */
(unsigned char *) "PLUS", /* 279 */
(unsigned char *) "AND", /* 280 */
(unsigned char *) "BOR", /* 281 */
(unsigned char *) "APPEND", /* 282 */
(unsigned char *) "EQ", /* 283 */
(unsigned char *) "GE", /* 284 */
(unsigned char *) "GT", /* 285 */
(unsigned char *) "LE", /* 286 */
(unsigned char *) "LT", /* 287 */
(unsigned char *) "NE", /* 288 */
(unsigned char *) "IN", /* 289 */
(unsigned char *) "ARG", /* 290 */
(unsigned char *) "BLTIN", /* 291 */
(unsigned char *) "BREAK", /* 292 */
(unsigned char *) "CONTINUE", /* 293 */
(unsigned char *) "DELETE", /* 294 */
(unsigned char *) "DO", /* 295 */
(unsigned char *) "EXIT", /* 296 */
(unsigned char *) "FOR", /* 297 */
(unsigned char *) "FUNC", /* 298 */
(unsigned char *) "SUB", /* 299 */
(unsigned char *) "GSUB", /* 300 */
(unsigned char *) "IF", /* 301 */
(unsigned char *) "INDEX", /* 302 */
(unsigned char *) "LSUBSTR", /* 303 */
(unsigned char *) "MATCHFCN", /* 304 */
(unsigned char *) "NEXT", /* 305 */
(unsigned char *) "ADD", /* 306 */
(unsigned char *) "MINUS", /* 307 */
(unsigned char *) "MULT", /* 308 */
(unsigned char *) "DIVIDE", /* 309 */
(unsigned char *) "MOD", /* 310 */
(unsigned char *) "ASSIGN", /* 311 */
(unsigned char *) "ASGNOP", /* 312 */
(unsigned char *) "ADDEQ", /* 313 */
(unsigned char *) "SUBEQ", /* 314 */
(unsigned char *) "MULTEQ", /* 315 */
(unsigned char *) "DIVEQ", /* 316 */
(unsigned char *) "MODEQ", /* 317 */
(unsigned char *) "POWEQ", /* 318 */
(unsigned char *) "PRINT", /* 319 */
(unsigned char *) "PRINTF", /* 320 */
(unsigned char *) "SPRINTF", /* 321 */
(unsigned char *) "ELSE", /* 322 */
(unsigned char *) "INTEST", /* 323 */
(unsigned char *) "CONDEXPR", /* 324 */
(unsigned char *) "POSTINCR", /* 325 */
(unsigned char *) "PREINCR", /* 326 */
(unsigned char *) "POSTDECR", /* 327 */
(unsigned char *) "PREDECR", /* 328 */
(unsigned char *) "VAR", /* 329 */
(unsigned char *) "IVAR", /* 330 */
(unsigned char *) "VARNF", /* 331 */
(unsigned char *) "CALL", /* 332 */
(unsigned char *) "NUMBER", /* 333 */
(unsigned char *) "STRING", /* 334 */
(unsigned char *) "FIELD", /* 335 */
(unsigned char *) "REGEXPR", /* 336 */
(unsigned char *) "GETLINE", /* 337 */
(unsigned char *) "RETURN", /* 338 */
(unsigned char *) "SPLIT", /* 339 */
(unsigned char *) "SUBSTR", /* 340 */
(unsigned char *) "WHILE", /* 341 */
(unsigned char *) "CAT", /* 342 */
(unsigned char *) "NOT", /* 343 */
(unsigned char *) "UMINUS", /* 344 */
(unsigned char *) "POWER", /* 345 */
(unsigned char *) "DECR", /* 346 */
(unsigned char *) "INCR", /* 347 */
(unsigned char *) "INDIRECT", /* 348 */
(unsigned char *) "LASTTOKEN", /* 349 */
};
Cell *(*proctab[92])(Node **, int) = {
nullproc, /* FIRSTTOKEN */
program, /* PROGRAM */
pastat, /* PASTAT */
dopa2, /* PASTAT2 */
nullproc, /* XBEGIN */
nullproc, /* XEND */
nullproc, /* NL */
array, /* ARRAY */
matchop, /* MATCH */
matchop, /* NOTMATCH */
nullproc, /* MATCHOP */
nullproc, /* FINAL */
nullproc, /* DOT */
nullproc, /* ALL */
nullproc, /* CCL */
nullproc, /* NCCL */
nullproc, /* CHAR */
nullproc, /* MCHAR */
nullproc, /* OR */
nullproc, /* STAR */
nullproc, /* QUEST */
nullproc, /* PLUS */
boolop, /* AND */
boolop, /* BOR */
nullproc, /* APPEND */
relop, /* EQ */
relop, /* GE */
relop, /* GT */
relop, /* LE */
relop, /* LT */
relop, /* NE */
instat, /* IN */
arg, /* ARG */
bltin, /* BLTIN */
jump, /* BREAK */
jump, /* CONTINUE */
delete, /* DELETE */
dostat, /* DO */
jump, /* EXIT */
forstat, /* FOR */
nullproc, /* FUNC */
sub, /* SUB */
gsub, /* GSUB */
ifstat, /* IF */
sindex, /* INDEX */
nullproc, /* LSUBSTR */
matchop, /* MATCHFCN */
jump, /* NEXT */
arith, /* ADD */
arith, /* MINUS */
arith, /* MULT */
arith, /* DIVIDE */
arith, /* MOD */
assign, /* ASSIGN */
nullproc, /* ASGNOP */
assign, /* ADDEQ */
assign, /* SUBEQ */
assign, /* MULTEQ */
assign, /* DIVEQ */
assign, /* MODEQ */
assign, /* POWEQ */
print, /* PRINT */
aprintf, /* PRINTF */
awsprintf, /* SPRINTF */
nullproc, /* ELSE */
intest, /* INTEST */
condexpr, /* CONDEXPR */
incrdecr, /* POSTINCR */
incrdecr, /* PREINCR */
incrdecr, /* POSTDECR */
incrdecr, /* PREDECR */
nullproc, /* VAR */
nullproc, /* IVAR */
getnf, /* VARNF */
call, /* CALL */
nullproc, /* NUMBER */
nullproc, /* STRING */
nullproc, /* FIELD */
nullproc, /* REGEXPR */
getline, /* GETLINE */
jump, /* RETURN */
split, /* SPLIT */
substr, /* SUBSTR */
whilestat, /* WHILE */
cat, /* CAT */
boolop, /* NOT */
arith, /* UMINUS */
arith, /* POWER */
nullproc, /* DECR */
nullproc, /* INCR */
indirect, /* INDIRECT */
nullproc, /* LASTTOKEN */
};
unsigned char *tokname(int n)
{
static unsigned char buf[100];
if (n < FIRSTTOKEN || n > LASTTOKEN) {
snprintf((char *)buf, sizeof buf, "token %d", n);
return buf;
}
return printname[n-257];
}

View file

@ -0,0 +1,11 @@
--- nawk/Makefile.mk
+++ nawk/Makefile.mk
@@ -28,8 +28,6 @@ maketab: maketab.o
$(HOSTCC) maketab.o -o maketab
./maketab > proctab.c
-proctab.c: maketab
-
awk.g.o: awk.g.c
$(CC) $(CFLAGSS) $(CPPFLAGS) $(XO5FL) $(LARGEF) $(IWCHAR) $(ICOMMON) $(IUXRE) -c awk.g.c

View file

@ -0,0 +1,73 @@
--- comm/comm.c
+++ comm/comm.c
@@ -242,7 +242,7 @@ compare(const char *a, const char *b)
return(2);
}
} else {
- n = strcoll(a, b);
+ n = strcmp(a, b);
return n ? n > 0 ? 2 : 1 : 0;
}
}
--- expr/expr.y
+++ expr/expr.y
@@ -234,7 +234,7 @@ _rel(int op, register char *r1, register char *r2)
if (numeric(r1) && numeric(r2))
i = atoll(r1) - atoll(r2);
else
- i = strcoll(r1, r2);
+ i = strcmp(r1, r2);
switch(op) {
case EQ: i = i==0; break;
case GT: i = i>0; break;
--- join/join.c
+++ join/join.c
@@ -65,7 +65,7 @@ enum {
JF = -1
};
#define ppi(f, j) ((j) >= 0 && (j) < ppisize[f] ? ppibuf[f][j] : null)
-#define comp() strcoll(ppi(F1, j1),ppi(F2, j2))
+#define comp() strcmp(ppi(F1, j1),ppi(F2, j2))
#define next(wc, s, n) (*(s) & 0200 ? ((n) = mbtowi(&(wc), (s), mb_cur_max), \
(n) = ((n) > 0 ? (n) : (n) < 0 ? (wc=WEOF, 1) : 1)) : \
--- ls/ls.c
+++ ls/ls.c
@@ -575,13 +575,13 @@ _mergesort(struct file **al)
static int
namecmp(struct file *f1, struct file *f2)
{
- return strcoll(f1->name, f2->name);
+ return strcmp(f1->name, f2->name);
}
static int
extcmp(struct file *f1, struct file *f2)
{
- return strcoll(extension(f1->name), extension(f2->name));
+ return strcmp(extension(f1->name), extension(f2->name));
}
static int
--- nawk/run.c
+++ nawk/run.c
@@ -608,7 +608,7 @@ Cell *relop(Node **a, int n)
j = x->fval - y->fval;
i = j<0? -1: (j>0? 1: 0);
} else {
- i = strcoll((char*)getsval(x), (char*)getsval(y));
+ i = strcmp((char*)getsval(x), (char*)getsval(y));
}
tempfree(x, "");
tempfree(y, "");
--- sort/sort.c
+++ sort/sort.c
@@ -1148,7 +1148,7 @@ cmpl(const char *pa, const char *pb)
ecpy(collba, pa, '\n');
ecpy(collbb, pb, '\n');
- n = strcoll(collba, collbb);
+ n = strcmp(collba, collbb);
return n ? n > 0 ? -fields[0].rflg : fields[0].rflg : 0;
}

View file

@ -0,0 +1,64 @@
#include <getopt.h>
extern int optopt;
int ftruncate(int fd, int offset) {
return -1;
}
int getsid (int pid) {
return -1;
}
static int isblank(int c)
{
return c == ' ' || c == '\t';
}
#define lchown chown
// meslibc implements lstat but is missing declaration
#include <sys/stat.h>
int lstat (char const *file_name, struct stat *statbuf);
#include <fcntl.h>
int mkstemp(char *t)
{
mktemp(t);
int fd = open(t, O_CREAT|O_RDWR|O_TRUNC, 0600);
return fd;
}
int putenv(char *string)
{
return 0;
}
char* realpath (char* path, char* resolved) {
return NULL;
}
#define strncasecmp(a,b,n) strncmp(strupr(a),strupr(b),n)
#define nlink_t unsigned long
#include <limits.h>
#define USHRT_MAX UINT16_MAX
#define SSIZE_MAX LONG_MAX
#define MB_LEN_MAX 1
#define EPERM 1
#define ESRCH 3
#define EDOM 33
#define S_IFSOCK 0140000
#define S_ISVTX 01000
#define S_IREAD S_IRUSR
#define S_IWRITE S_IWUSR
#define S_IEXEC S_IXUSR
#define _PC_PATH_MAX PATH_MAX
#define _PC_VDISABLE 8
#define _POSIX_PATH_MAX PATH_MAX
#define LINE_MAX 4096
#define LC_TIME 0

View file

@ -0,0 +1,77 @@
--- cmp/cmp.c
+++ cmp/cmp.c
@@ -264,7 +264,7 @@ openfile(const char *fn)
struct file *f;
if (pagesize == 0)
- if ((pagesize = sysconf(_SC_PAGESIZE)) < 0)
+ if ((pagesize = 4096) < 0)
pagesize = 4096;
if ((f = memalign(pagesize, sizeof *f)) == NULL) {
write(2, "no memory\n", 10);
--- copy/copy.c
+++ copy/copy.c
@@ -362,7 +362,7 @@ fdcopy(const char *src, const struct stat *sp, int sfd,
goto err;
}
#endif /* __linux__ */
- if (pagesize == 0 && (pagesize = sysconf(_SC_PAGESIZE)) <= 0)
+ if (pagesize == 0 && (pagesize = 4096) <= 0)
pagesize = 4096;
if ((blksize = sp->st_blksize) <= 0)
blksize = 512;
--- cp/cp.c
+++ cp/cp.c
@@ -438,7 +438,7 @@ fdcopy(const char *src, const struct stat *ssp, const int sfd,
}
#endif /* __linux__ */
if (pagesize == 0)
- if ((pagesize = sysconf(_SC_PAGESIZE)) < 0)
+ if ((pagesize = 4096) < 0)
pagesize = 4096;
if (bflag)
blksize = bflag;
--- libcommon/ib_alloc.c
+++ libcommon/ib_alloc.c
@@ -41,7 +41,7 @@ ib_alloc(int fd, unsigned blksize)
struct stat st;
if (pagesize == 0)
- if ((pagesize = sysconf(_SC_PAGESIZE)) < 0)
+ if ((pagesize = 4096) < 0)
pagesize = 4096;
if (blksize == 0) {
if (fstat(fd, &st) < 0)
--- libcommon/memalign.c
+++ libcommon/memalign.c
@@ -40,7 +40,7 @@ memalign(size_t alignment, size_t size)
static long pagesize;
if (pagesize == 0)
- pagesize = sysconf(_SC_PAGESIZE);
+ pagesize = 4096;
if (alignment != pagesize)
return NULL;
if (size < pagesize)
--- libcommon/oblok.c
+++ libcommon/oblok.c
@@ -100,7 +100,7 @@ ob_alloc(int fd, enum ob_mode bf)
struct oblok *op;
if (pagesize == 0)
- if ((pagesize = sysconf(_SC_PAGESIZE)) < 0)
+ if ((pagesize = 4096) < 0)
pagesize = 4096;
if ((op = memalign(pagesize, sizeof *op)) == NULL)
return NULL;
--- xargs/xargs.c
+++ xargs/xargs.c
@@ -404,7 +404,7 @@ static void
endcmd(void)
{
a_agg = a_cnt;
- a_maxsize = sysconf(_SC_ARG_MAX) - envsz() - 2048 - a_asz;
+ a_maxsize = 65536 - envsz() - 2048 - a_asz;
if (nflag || sflag) {
long newsize = sflag ? atol(sflag) :
#ifdef WEIRD_LIMITS

View file

@ -0,0 +1,11 @@
--- libwchar/Makefile.mk
+++ libwchar/Makefile.mk
@@ -10,7 +10,7 @@ fake:
if test "x$(LWCHAR)" = x; \
then \
touch $(OBJ); \
- ar r libwchar.a $(OBJ); \
+ touch libwchar.a $(OBJ); \
fi
install:

View file

@ -0,0 +1,141 @@
--- ed/ed.c
+++ ed/ed.c
@@ -68,7 +68,6 @@ static const char sccsid[] USED = "@(#)ed.sl 1.99 (gritter) 7/27/06";
#include <stdlib.h>
#include <signal.h>
#include "sigset.h"
-#include <termios.h>
#include <setjmp.h>
#include <libgen.h>
#include <inttypes.h>
@@ -77,7 +76,6 @@ static const char sccsid[] USED = "@(#)ed.sl 1.99 (gritter) 7/27/06";
#include <ctype.h>
#include <wctype.h>
#include <limits.h>
-#include <termios.h>
static int FNSIZE;
static int LBSIZE;
static int RHSIZE;
@@ -2273,22 +2271,10 @@ sclose(int fd)
static void
fspec(const char *lp)
{
- struct termios ts;
const char *cp;
freetabs();
maxlength = 0;
- if (tcgetattr(1, &ts) < 0
-#ifdef TAB3
- || (ts.c_oflag&TAB3) == 0
-#endif
- )
- return;
- while (lp[0]) {
- if (lp[0] == '<' && lp[1] == ':')
- break;
- lp++;
- }
if (lp[0]) {
lp += 2;
while ((cp = ftok(&lp)) != NULL) {
--- ls/ls.c
+++ ls/ls.c
@@ -102,7 +102,6 @@ static char ifmt_c[] = "-pc-d-b--nl-SD--";
#include <grp.h>
#include <errno.h>
#include <fcntl.h>
-#include <termios.h>
#include <locale.h>
#include <limits.h>
#include <ctype.h>
@@ -110,14 +109,6 @@ static char ifmt_c[] = "-pc-d-b--nl-SD--";
#include <wchar.h>
#include <wctype.h>
#include "config.h"
-#ifndef USE_TERMCAP
-#ifndef sun
-#include <curses.h>
-#include <term.h>
-#endif
-#else /* USE_TERMCAP */
-#include <termcap.h>
-#endif /* USE_TERMCAP */
#ifdef _AIX
#include <sys/sysmacros.h>
@@ -989,13 +980,6 @@ printname(const char *name, struct file *f, int doit)
bold++;
}
if (color) {
-#ifndef USE_TERMCAP
- if (bold)
- vidattr(A_BOLD);
-#else /* USE_TERMCAP */
- if (Bold)
- tputs(Bold, 1, putchar);
-#endif /* USE_TERMCAP */
printf(color);
}
}
@@ -1056,13 +1040,6 @@ printname(const char *name, struct file *f, int doit)
}
}
if (doit && color) {
-#if !defined (USE_TERMCAP)
- if (bold)
- vidattr(A_NORMAL);
-#else /* USE_TERMCAP */
- if (Normal)
- tputs(Normal, 1, putchar);
-#endif /* USE_TERMCAP */
printf(fc_get(FC_NORMAL));
}
if (f)
@@ -1598,16 +1575,12 @@ main(int argc, char **argv)
{
struct file *flist = nil, **aflist = &flist;
enum depth depth;
- struct winsize ws;
int i;
char *cp;
#ifdef __GLIBC__
putenv("POSIXLY_CORRECT=1");
#endif
- setlocale(LC_COLLATE, "");
- setlocale(LC_CTYPE, "");
- setlocale(LC_TIME, "");
#ifndef UCB
if (getenv("SYSV3") != NULL)
sysv3 = 1;
@@ -1624,16 +1597,6 @@ main(int argc, char **argv)
}
if (istty || isatty(1)) {
istty = 1;
-#if !defined (USE_TERMCAP)
- setupterm(NULL, 1, &tinfostat);
-#else /* USE_TERMCAP */
- {
- char buf[2048];
- if ((cp = getenv("TERM")) != NULL)
- if (tgetent(buf, cp) > 0)
- tinfostat = 1;
- }
-#endif /* USE_TERMCAP */
field |= FL_STATUS;
}
while ((i = getopt(argc, argv, personalities[personality].per_opt))
@@ -1753,12 +1716,6 @@ main(int argc, char **argv)
if ((cp = getenv("COLUMNS")) != NULL) {
ncols = atoi(cp);
} else if ((present('C') || present('x') || present('m')) && istty) {
- if (ioctl(1, TIOCGWINSZ, &ws) == 0 && ws.ws_col > 0)
- ncols = ws.ws_col - 1;
-#if !defined (USE_TERMCAP)
- else if (tinfostat == 1 && columns > 0)
- ncols = columns;
-#endif /* !USE_TERMCAP */
}
depth = SURFACE;
if (optind == argc) {

View file

@ -0,0 +1,90 @@
--- copy/copy.c
+++ copy/copy.c
@@ -46,7 +46,6 @@ static const char sccsid[] USED = "@(#)copy.sl 1.15 (gritter) 5/29/05";
#include <libgen.h>
#include <limits.h>
#include <dirent.h>
-#include <utime.h>
#include <stdarg.h>
#include "sfile.h"
#include "memalign.h"
@@ -441,12 +440,6 @@ attribs(const char *dst, const struct stat *sp)
if (oflag && ((sp->st_mode&S_IFMT) == S_IFLNK ?
lchown:chown)(dst, sp->st_uid, sp->st_gid) < 0)
complain("Unable to chown %s", dst);
- if (mflag && (sp->st_mode&S_IFMT) != S_IFLNK) {
- struct utimbuf ut;
- ut.actime = sp->st_atime;
- ut.modtime = sp->st_mtime;
- utime(dst, &ut);
- }
}
static void
--- cp/cp.c
+++ cp/cp.c
@@ -56,7 +56,6 @@ static const char sccsid[] USED = "@(#)cp.sl 1.84 (gritter) 3/4/06";
#include <libgen.h>
#include <limits.h>
#include <dirent.h>
-#include <utime.h>
#include "sfile.h"
#include "memalign.h"
#include "alloca.h"
@@ -354,18 +353,6 @@ permissions(const char *path, const struct stat *ssp)
mode = ssp->st_mode & 07777;
if (pflag) {
- struct utimbuf ut;
- ut.actime = ssp->st_atime;
- ut.modtime = ssp->st_mtime;
- if (utime(path, &ut) < 0) {
-#if defined (SUS) || defined (S42)
- fprintf(stderr, "%s: cannot set times for %s\n%s: %s\n",
- progname, path,
- progname, strerror(errno));
-#endif /* SUS || S42 */
- if (pers != PERS_MV)
- errcnt |= 010;
- }
if (myuid == 0) {
if (chown(path, ssp->st_uid, ssp->st_gid) < 0) {
#if defined (SUS) || defined (S42)
--- touch/touch.c
+++ touch/touch.c
@@ -47,7 +47,6 @@ static const char sccsid[] USED = "@(#)touch.sl 1.21 (gritter) 5/29/05";
#include <stdlib.h>
#include <errno.h>
#include <libgen.h>
-#include <utime.h>
#include <ctype.h>
#include <time.h>
@@ -80,7 +79,6 @@ static void
touch(const char *fn)
{
struct stat st;
- struct utimbuf ut;
if (stat(fn, &st) < 0) {
if (errno == ENOENT) {
@@ -113,19 +111,6 @@ touch(const char *fn)
return;
}
}
- if (aflag)
- ut.actime = nacc;
- else
- ut.actime = st.st_atime;
- if (mflag)
- ut.modtime = nmod;
- else
- ut.modtime = st.st_mtime;
- if (utime(fn, nulltime ? NULL : &ut) < 0) {
- fprintf(stderr, "%s: cannot change times on %s\n",
- progname, fn);
- errcnt++;
- }
}
static void

View file

@ -0,0 +1,128 @@
--- cksum/cksum.c
+++ cksum/cksum.c
@@ -147,7 +147,7 @@ cksum(const char *name)
s = (s << 8) ^ crctab[(s >> 24) ^ c];
}
s = ~s;
- printf("%u %llu", (unsigned)s, nbytes);
+ printf("%u %lu", (unsigned)s, nbytes);
if(name)
printf(" %s", name);
printf("\n");
--- cmp/cmp.c
+++ cmp/cmp.c
@@ -246,8 +246,8 @@ different:
errcnt = 1;
} else {
if (sflag == 0)
- printf("%s %s differ: char %lld,"
- " line %lld\n",
+ printf("%s %s differ: char %ld,"
+ " line %ld\n",
f1->f_nam, f2->f_nam,
(long long)offset(f1),
line);
--- csplit/csplit.c
+++ csplit/csplit.c
@@ -284,7 +284,7 @@ csplit(const char *fn)
op = nextfile();
if (op) {
if (!sflag)
- printf("%lld\n", bytes);
+ printf("%ld\n", bytes);
bytes = 0;
fclose(op);
}
--- expr/expr.y
+++ expr/expr.y
@@ -140,7 +140,7 @@ expression: expr NOARG {
if (sus && numeric($1)) {
int64_t n;
n = atoll($1);
- printf("%lld\n", n);
+ printf("%ld\n", n);
exit(n == 0);
} else
puts($1);
@@ -447,10 +447,10 @@ numpr(int64_t val)
int ret;
rv = smalloc(NUMSZ);
- ret = snprintf(rv, NUMSZ, "%lld", (long long)val);
+ ret = snprintf(rv, NUMSZ, "%ld", (long long)val);
if (ret < 0 || ret >= NUMSZ) {
rv = srealloc(rv, ret + 1);
- ret = snprintf(rv, ret, "%lld", (long long)val);
+ ret = snprintf(rv, ret, "%ld", (long long)val);
if (ret < 0)
yyerror("illegal number");
}
--- grep/Makefile.mk
+++ grep/Makefile.mk
@@ -92,7 +92,7 @@ config.h:
-echo 'long long foo;' >___build$$$$.c ; \
$(CC) $(CFLAGS2) $(CPPFLAGS) $(IWCHAR) $(ICOMMON) $(IUXRE) $(LARGEF) -c ___build$$$$.c >/dev/null 2>&1 ; \
if test $$? = 0 && test -f ___build$$$$.o ; \
- then echo '#define LONGLONG' >>config.h ; \
+ then echo '' >>config.h ; \
fi ; \
rm -f ___build$$$$.o ___build$$$$.c
--- ls/Makefile.mk
+++ ls/Makefile.mk
@@ -76,7 +76,7 @@ config.h:
-echo 'long long foo;' >___build$$$$.c ; \
$(CC) $(CFLAGS) $(CPPFLAGS) $(LARGEF) $(IWCHAR) -c ___build$$$$.c >/dev/null 2>&1 ; \
if test $$? = 0 && test -f ___build$$$$.o ; \
- then echo '#define LONGLONG' >>config.h ; \
+ then echo '' >>config.h ; \
fi ; \
rm -f ___build$$$$.o ___build$$$$.c
-echo '#include <sys/types.h>' >___build$$$$.c ; \
--- pr/pr.c
+++ pr/pr.c
@@ -548,7 +548,7 @@ print(const char *fp, const char **argp)
putcs(" ");
putcs(header);
snprintf(linebuf, sizeof linebuf,
- " Page %lld\n\n\n", page);
+ " Page %ld\n\n\n", page);
putcs(linebuf);
}
c = putpage();
--- sed/sed1.c
+++ sed/sed1.c
@@ -489,7 +489,7 @@ command(struct reptr *ipc)
break;
case EQCOM:
- fprintf(stdout, "%lld\n", lnum);
+ fprintf(stdout, "%ld\n", lnum);
break;
case GCOM:
--- sum/sum.c
+++ sum/sum.c
@@ -116,7 +116,7 @@ sum(const char *name)
else {
s = (s & 0xFFFF) + (s >> 16);
s = (s & 0xFFFF) + (s >> 16);
- printf("%u %llu", (unsigned)s,
+ printf("%u %lu", (unsigned)s,
(unsigned long long)(nbytes+UNIT-1)/UNIT);
}
if(name)
--- wc/wc.c
+++ wc/wc.c
@@ -89,9 +89,9 @@ report(unsigned long long count)
#if defined (S42)
if (putspace++)
printf(" ");
- printf("%llu", count);
+ printf("%lu", count);
#else /* !S42 */
- printf("%7llu ", count);
+ printf("%7lu ", count);
#endif /* !S42 */
}

View file

@ -10,12 +10,12 @@
stdenv.mkDerivation rec {
pname = "pgpool-II";
version = "4.4.2";
version = "4.4.3";
src = fetchurl {
url = "https://www.pgpool.net/mediawiki/download.php?f=pgpool-II-${version}.tar.gz";
name = "pgpool-II-${version}.tar.gz";
sha256 = "sha256-Pmx4jnDwZyx7OMiKbKdvMfN4axJWiZgMwGOrdSylgjQ=";
sha256 = "sha256-RnRaqY9FTgl87LTaz1NvicN+0+xB8y8KhGk0Ip0OtzM=";
};
buildInputs = [

View file

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "eksctl";
version = "0.143.0";
version = "0.144.0";
src = fetchFromGitHub {
owner = "weaveworks";
repo = pname;
rev = version;
hash = "sha256-FVZQooV1sygxubPZ/9CvWIEcDhDGIbreDPUBrtyIy60=";
hash = "sha256-ZbapTT9tZFz+TGefElU3oHhLc6mWqxd4L9HxcryFuHw=";
};
vendorHash = "sha256-WJ7pTooO4/o0IR4Rio+EoN7oxmobG7GqT7aEUqusKI0=";
vendorHash = "sha256-4ORKH9jnrow3gbV6zyiWb93yJzJVfIe/O+wST5+DmFQ=";
doCheck = false;

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation {
installFlags = [ "PREFIX=$(out)" "MANDIR=$(out)/share/man" ];
meta = {
description = "CLI frontend to the poppler-glib libary of PDF tools";
description = "CLI frontend to the poppler-glib library of PDF tools";
homepage = "https://github.com/TrilbyWhite/Leela";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.puffnfresh ];

View file

@ -0,0 +1,43 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, qtbase
, qt6
, wrapQtAppsHook
}:
stdenv.mkDerivation rec {
pname = "maskromtool";
version = "2023-05-30";
src = fetchFromGitHub {
owner = "travisgoodspeed";
repo = "maskromtool";
rev = "v${version}";
hash = "sha256-HiP9igrq9rmW7MxdTdOsJ86j/Ccxb2lFTaIJfyUW7Bo=";
};
buildInputs = [
qtbase
qt6.qtcharts
qt6.qttools
];
nativeBuildInputs = [
cmake
wrapQtAppsHook
];
meta = {
description = "A CAD tool for extracting bits from Mask ROM photographs";
homepage = "https://github.com/travisgoodspeed/maskromtool";
license = [
lib.licenses.beerware
lib.licenses.gpl1Plus
];
maintainers = [
lib.maintainers.evanrichter
];
};
}

View file

@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "dupd";
version = "1.7.2";
version = "1.7.3";
src = fetchFromGitHub {
owner = "jvirkki";
repo = "dupd";
rev = version;
sha256 = "sha256-Jl95Ke1AntYeTKARQTXm5qMhwISEw4Pvnr6I2WEFlP4=";
sha256 = "sha256-ZiQroJ5fjBCIjU+M8KRA0N3Mrg9h0NVtfYUIS4cYyhw=";
};
postPatch = ''

View file

@ -7,16 +7,16 @@
rustPlatform.buildRustPackage rec {
pname = "fclones";
version = "0.31.0";
version = "0.31.1";
src = fetchFromGitHub {
owner = "pkolaczk";
repo = pname;
rev = "v${version}";
hash = "sha256-VJU6qfcsV1VO/b8LQmIARGhkB8LrGcGsnfu1rUbK3rA=";
hash = "sha256-7XixwONEgALMEQlF+SAzx8SO79GrNE8YBX2bDcslVdE=";
};
cargoHash = "sha256-KkJyB6Bdy+gjLHFgLML0rX8OF3/2yXO6XAwUOyvbQIE=";
cargoHash = "sha256-hsidW0T8a6Bj8g+ybm3XX0Ddha+z4/DzHBSQD1jRa3A=";
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.AppKit

View file

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
buildInputs = lib.optionals withUdisks [ udisks glib ]
++ lib.optional (!withLibui) libX11
++ lib.optional withLibui gtk3;
# libui is bundled with the source of usbimager as a compiled static libary
# libui is bundled with the source of usbimager as a compiled static library
postPatch = ''
sed -i \

View file

@ -12,19 +12,19 @@
stdenv.mkDerivation rec {
pname = "uutils-coreutils";
version = "0.0.17";
version = "0.0.19";
src = fetchFromGitHub {
owner = "uutils";
repo = "coreutils";
rev = version;
sha256 = "sha256-r4IpmwZaRKzesvq7jAjCvfvZVmfcvwj23zMH3VnlC4I=";
sha256 = "sha256-ysMSO6VaiaL4Sh5F0VbeAQYOo78lhVQjewZ5lwaCLRM=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-ZbGLBjjAsdEhWK3/RS+yRI70xqV+5fzg76Y2Lip1m9A=";
hash = "sha256-cBocRWIpG2BQZDPJq4cNNYrFg/MBR3o58fXGHanTn30=";
};
nativeBuildInputs = [ rustPlatform.cargoSetupHook sphinx ];

View file

@ -4,16 +4,16 @@
rustPlatform.buildRustPackage rec {
pname = "nix-index";
version = "0.1.5";
version = "0.1.6";
src = fetchFromGitHub {
owner = "bennofs";
repo = "nix-index";
rev = "v${version}";
sha256 = "sha256-/btQP7I4zpIA0MWEQJVYnR1XhyudPnYD5Qx4vrW+Uq8=";
sha256 = "sha256-mdK63qRVvISRbRwfMel4SYucmBxR6RLbM4IFz3K3Pks=";
};
cargoSha256 = "sha256-CzLBOLtzIYqdWjTDKHVnc1YXXyj1HqvXzoFYHS0qxog=";
cargoHash = "sha256-uIGxCaFj4x1Ck/D2xxOlosJaGSVbOKxbXAEAkkBxyaQ=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl curl sqlite ]

View file

@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "exploitdb";
version = "2023-06-08";
version = "2023-06-10";
src = fetchFromGitLab {
owner = "exploit-database";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-zvbWYPpexd4V8kVKH2g+SE481zD9MaZa7ISIZK4weug=";
hash = "sha256-DSn7ngNeW0PWQYnh5d1LQ0RO3PoQcplSGUytWX5QTww=";
};
nativeBuildInputs = [

View file

@ -6,16 +6,16 @@
buildGoModule rec {
pname = "vault";
version = "1.13.2";
version = "1.13.3";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "vault";
rev = "v${version}";
sha256 = "sha256-U4V2+O8//6mkuznSHkPWeeJNK6NtUTEhFk7zz3FEe58=";
sha256 = "sha256-/AqUsjZArL4KjAzSkb1sM/xhKCIlg+2uvkV0TVwI1Q4=";
};
vendorHash = "sha256-eyXmmhMAbLJiLwQQAR4+baU53n2WY5laUKEGoPjpBg4=";
vendorHash = "sha256-Wt5VahshNI/etzQQdcKgD/TBuD4NMi5eVPMHiJYfScY=";
subPackages = [ "." ];

View file

@ -14,17 +14,17 @@
rustPlatform.buildRustPackage rec {
pname = "tectonic";
version = "0.12.0";
version = "0.13.1";
src = fetchFromGitHub {
owner = "tectonic-typesetting";
repo = "tectonic";
rev = "tectonic@${version}";
fetchSubmodules = true;
sha256 = "sha256-m2wBZNaepad4eaT/1DTjzAYrDX2wH/7wMfdzPWHQOLI=";
sha256 = "sha256-m1KmyVB4/Flr/xZGY7ixRZhEGNcIPWnwzUsf3VLqzZc=";
};
cargoSha256 = "sha256-pMqwWWmPxJZbJavxSVfjjRd7u9fI2AUZRjHF5SxxqoU=";
cargoHash = "sha256-Q1b7/XJ5Aq2hV2uv12B64WI+JOw6M8J3KITXs5cUo6U=";
nativeBuildInputs = [ pkg-config makeBinaryWrapper ];

View file

@ -0,0 +1,32 @@
diff --git a/3rd-party/CMakeLists.txt b/3rd-party/CMakeLists.txt
index 188ebfc6..4a34a922 100644
--- a/3rd-party/CMakeLists.txt
+++ b/3rd-party/CMakeLists.txt
@@ -2,12 +2,8 @@ include(FetchContent)
set(FETCHCONTENT_QUIET FALSE)
FetchContent_Declare(gRPC
- GIT_REPOSITORY https://github.com/CanonicalLtd/grpc.git
- GIT_TAG ba8e7f72
- GIT_SHALLOW TRUE
- GIT_SUBMODULES "third_party/abseil-cpp third_party/cares/cares third_party/protobuf third_party/re2 third_party/zlib"
- GIT_SUBMODULES_RECURSE false
- GIT_PROGRESS TRUE
+ DOWNLOAD_COMMAND true
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/grpc
)
set(gRPC_SSL_PROVIDER "package" CACHE STRING "Provider of ssl library")
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 52bd407f..a1100112 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -28,7 +28,7 @@ FetchContent_Declare(googletest
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(INSTALL_GTEST OFF CACHE BOOL "")
-FetchContent_MakeAvailable(googletest)
+# FetchContent_MakeAvailable(googletest)
add_executable(multipass_tests
blueprint_test_lambdas.cpp

View file

@ -25,43 +25,51 @@
let
pname = "multipass";
version = "1.11.1";
version = "1.12.0";
# This is done here because a CMakeLists.txt from one of it's submodules tries
# to modify a file, so we grab the source for the submodule here, copy it into
# the source of the Multipass project which allows the modification to happen.
grpc_src = fetchFromGitHub {
owner = "CanonicalLtd";
repo = "grpc";
rev = "ba8e7f72a57b9e0b25783a4d3cea58c79379f194";
hash = "sha256-DS1UNLCUdbipn5w4p2aVa8LgHHhdJiAfzfEdIXNO69o=";
fetchSubmodules = true;
};
in
stdenv.mkDerivation {
stdenv.mkDerivation
{
inherit pname version;
src = fetchFromGitHub {
owner = "canonical";
repo = "multipass";
rev = "refs/tags/v${version}";
sha256 = "sha256-AIZs+NRAn/r9EjTx9InDZzS4ycni4MZQXmC0A5rpaJk=";
sha256 = "sha256-CwyiLkpyTfn4734ESnHHWwiMdy3AP0BuQv6Uc1nTAuU=";
fetchSubmodules = true;
};
preConfigure = ''
patches = [
./lxd_socket_path.patch
./cmake_no_fetch.patch
];
postPatch = ''
# Make sure the version is reported correctly in the compiled binary.
substituteInPlace ./CMakeLists.txt \
--replace "determine_version(MULTIPASS_VERSION)" "" \
--replace 'set(MULTIPASS_VERSION ''${MULTIPASS_VERSION})' 'set(MULTIPASS_VERSION "v${version}")'
# Patch the patch of the OVMF binaries to use paths from the nix store.
substituteInPlace ./src/platform/backends/qemu/linux/qemu_platform_detail_linux.cpp \
--replace "OVMF.fd" "${OVMF.fd}/FV/OVMF.fd" \
--replace "QEMU_EFI.fd" "${OVMF.fd}/FV/QEMU_EFI.fd"
'';
postPatch = ''
# Patch all of the places where Multipass expects the LXD socket to be provided by a snap
substituteInPlace ./src/network/network_access_manager.cpp \
--replace "/var/snap/lxd/common/lxd/unix.socket" "/var/lib/lxd/unix.socket"
substituteInPlace ./src/platform/backends/lxd/lxd_virtual_machine.cpp \
--replace "/var/snap/lxd/common/lxd/unix.socket" "/var/lib/lxd/unix.socket"
substituteInPlace ./src/platform/backends/lxd/lxd_request.h \
--replace "/var/snap/lxd/common/lxd/unix.socket" "/var/lib/lxd/unix.socket"
substituteInPlace ./tests/CMakeLists.txt \
--replace "FetchContent_MakeAvailable(googletest)" ""
# Copy the grpc submodule we fetched into the source code.
cp -r --no-preserve=mode ${grpc_src} 3rd-party/grpc
# Configure CMake to use gtest from the nix store since we disabled fetching from the internet.
cat >> tests/CMakeLists.txt <<'EOF'
add_library(gtest INTERFACE)
target_include_directories(gtest INTERFACE ${gtest.dev}/include)

View file

@ -0,0 +1,13 @@
diff --git a/src/platform/backends/lxd/lxd_request.h b/src/platform/backends/lxd/lxd_request.h
index 4b5e8840..5e673ad7 100644
--- a/src/platform/backends/lxd/lxd_request.h
+++ b/src/platform/backends/lxd/lxd_request.h
@@ -27,7 +27,7 @@
namespace multipass
{
-const QUrl lxd_socket_url{"unix:///var/snap/lxd/common/lxd/unix.socket@1.0"};
+const QUrl lxd_socket_url{"unix:///var/lib/lxd/unix.socket@1.0"};
const QString lxd_project_name{"multipass"};
class NetworkAccessManager;

View file

@ -213,6 +213,7 @@ mapAliases ({
cassandra_2_1 = throw "cassandra_2_1 has been removed, please use cassandra_3_11 instead"; # Added 2022-10-29
cassandra_2_2 = throw "cassandra_2_2 has been removed, please use cassandra_3_11 instead"; # Added 2022-10-29
catfish = xfce.catfish; # Added 2019-12-22
ccloud-cli = throw "ccloud-cli has been removed, please use confluent-cli instead"; # Added 2023-06-09
ccnet = throw "ccnet has been removed because seafile does not depend on it anymore"; # Added 2021-03-25
cde-gtk-theme = throw "cde-gtk-theme has been removed from nixpkgs as it shipped with python2 scripts that didn't work anymore"; # Added 2022-01-12
cgmanager = throw "cgmanager was deprecated by lxc and therefore removed from nixpkgs"; # Added 2020-06-05

View file

@ -6241,6 +6241,8 @@ with pkgs;
can-utils = callPackage ../os-specific/linux/can-utils { };
cannelloni = callPackage ../os-specific/linux/cannelloni { };
caudec = callPackage ../applications/audio/caudec { };
ccd2iso = callPackage ../tools/cd-dvd/ccd2iso { };
@ -9398,6 +9400,8 @@ with pkgs;
mask = callPackage ../development/tools/mask { };
maskromtool = qt6Packages.callPackage ../tools/graphics/maskromtool { };
mathpix-snipping-tool = callPackage ../tools/misc/mathpix-snipping-tool { };
matrix-conduit = callPackage ../servers/matrix-conduit { };
@ -18685,8 +18689,6 @@ with pkgs;
highlight-assertions = callPackage ../development/tools/misc/highlight-assertions { };
ccloud-cli = callPackage ../development/tools/ccloud-cli { };
confluent-cli = callPackage ../development/tools/confluent-cli { };
htmlunit-driver = callPackage ../development/tools/selenium/htmlunit-driver { };