Merge master into staging-next
This commit is contained in:
commit
839c033ffb
@ -9,6 +9,39 @@ rec {
|
||||
examples = import ./examples.nix { inherit lib; };
|
||||
architectures = import ./architectures.nix { inherit lib; };
|
||||
|
||||
/*
|
||||
Elaborated systems contain functions, which means that they don't satisfy
|
||||
`==` for a lack of reflexivity.
|
||||
|
||||
They might *appear* to satisfy `==` reflexivity when the same exact value is
|
||||
compared to itself, because object identity is used as an "optimization";
|
||||
compare the value with a reconstruction of itself, e.g. with `f == a: f a`,
|
||||
or perhaps calling `elaborate` twice, and one will see reflexivity fail as described.
|
||||
|
||||
Hence a custom equality test.
|
||||
|
||||
Note that this does not canonicalize the systems, so you'll want to make sure
|
||||
both arguments have been `elaborate`-d.
|
||||
*/
|
||||
equals =
|
||||
let removeFunctions = a: lib.filterAttrs (_: v: !builtins.isFunction v) a;
|
||||
in a: b: removeFunctions a == removeFunctions b;
|
||||
|
||||
/*
|
||||
Try to convert an elaborated system back to a simple string. If not possible,
|
||||
return null. So we have the property:
|
||||
|
||||
sys: _valid_ sys ->
|
||||
sys == elaborate (toLosslessStringMaybe sys)
|
||||
|
||||
NOTE: This property is not guaranteed when `sys` was elaborated by a different
|
||||
version of Nixpkgs.
|
||||
*/
|
||||
toLosslessStringMaybe = sys:
|
||||
if lib.isString sys then sys
|
||||
else if equals sys (elaborate sys.system) then sys.system
|
||||
else null;
|
||||
|
||||
/* List of all Nix system doubles the nixpkgs flake will expose the package set
|
||||
for. All systems listed here must be supported by nixpkgs as `localSystem`.
|
||||
|
||||
|
@ -53,6 +53,9 @@ let
|
||||
echo "Running lib/tests/sources.sh"
|
||||
TEST_LIB=$PWD/lib bash lib/tests/sources.sh
|
||||
|
||||
echo "Running lib/tests/systems.nix"
|
||||
[[ $(nix-instantiate --eval --strict lib/tests/systems.nix | tee /dev/stderr) == '[ ]' ]];
|
||||
|
||||
mkdir $out
|
||||
echo success > $out/${nix.version}
|
||||
'';
|
||||
|
@ -1,10 +1,8 @@
|
||||
# We assert that the new algorithmic way of generating these lists matches the
|
||||
# way they were hard-coded before.
|
||||
# Run:
|
||||
# [nixpkgs]$ nix-instantiate --eval --strict lib/tests/systems.nix
|
||||
# Expected output: [], or the failed cases
|
||||
#
|
||||
# One might think "if we exhaustively test, what's the point of procedurally
|
||||
# calculating the lists anyway?". The answer is one can mindlessly update these
|
||||
# tests as new platforms become supported, and then just give the diff a quick
|
||||
# sanity check before committing :).
|
||||
# OfBorg runs (approximately) nix-build lib/tests/release.nix
|
||||
let
|
||||
lib = import ../default.nix;
|
||||
mseteq = x: y: {
|
||||
@ -12,7 +10,16 @@ let
|
||||
expected = lib.sort lib.lessThan y;
|
||||
};
|
||||
in
|
||||
with lib.systems.doubles; lib.runTests {
|
||||
lib.runTests (
|
||||
# We assert that the new algorithmic way of generating these lists matches the
|
||||
# way they were hard-coded before.
|
||||
#
|
||||
# One might think "if we exhaustively test, what's the point of procedurally
|
||||
# calculating the lists anyway?". The answer is one can mindlessly update these
|
||||
# tests as new platforms become supported, and then just give the diff a quick
|
||||
# sanity check before committing :).
|
||||
|
||||
(with lib.systems.doubles; {
|
||||
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ mmix ++ js ++ genode ++ redox);
|
||||
|
||||
testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv6l-netbsd" "armv6l-none" "armv7a-linux" "armv7a-netbsd" "armv7l-linux" "armv7l-netbsd" "arm-none" "armv7a-darwin" ];
|
||||
@ -39,4 +46,44 @@ with lib.systems.doubles; lib.runTests {
|
||||
testopenbsd = mseteq openbsd [ "i686-openbsd" "x86_64-openbsd" ];
|
||||
testwindows = mseteq windows [ "i686-cygwin" "x86_64-cygwin" "i686-windows" "x86_64-windows" ];
|
||||
testunix = mseteq unix (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ cygwin ++ redox);
|
||||
})
|
||||
|
||||
// {
|
||||
test_equals_example_x86_64-linux = {
|
||||
expr = lib.systems.equals (lib.systems.elaborate "x86_64-linux") (lib.systems.elaborate "x86_64-linux");
|
||||
expected = true;
|
||||
};
|
||||
|
||||
test_toLosslessStringMaybe_example_x86_64-linux = {
|
||||
expr = lib.systems.toLosslessStringMaybe (lib.systems.elaborate "x86_64-linux");
|
||||
expected = "x86_64-linux";
|
||||
};
|
||||
test_toLosslessStringMaybe_fail = {
|
||||
expr = lib.systems.toLosslessStringMaybe (lib.systems.elaborate "x86_64-linux" // { something = "extra"; });
|
||||
expected = null;
|
||||
};
|
||||
}
|
||||
|
||||
# Generate test cases to assert that a change in any non-function attribute makes a platform unequal
|
||||
// lib.concatMapAttrs (platformAttrName: origValue: {
|
||||
|
||||
${"test_equals_unequal_${platformAttrName}"} =
|
||||
let modified =
|
||||
assert origValue != arbitraryValue;
|
||||
lib.systems.elaborate "x86_64-linux" // { ${platformAttrName} = arbitraryValue; };
|
||||
arbitraryValue = x: "<<modified>>";
|
||||
in {
|
||||
expr = lib.systems.equals (lib.systems.elaborate "x86_64-linux") modified;
|
||||
expected = {
|
||||
# Changes in these attrs are not detectable because they're function.
|
||||
# The functions should be derived from the data, so this is not a problem.
|
||||
canExecute = null;
|
||||
emulator = null;
|
||||
emulatorAvailable = null;
|
||||
isCompatible = null;
|
||||
}?${platformAttrName};
|
||||
};
|
||||
|
||||
}) (lib.systems.elaborate "x86_64-linux" /* arbitrary choice, just to get all the elaborated attrNames */)
|
||||
|
||||
)
|
||||
|
@ -3098,6 +3098,15 @@
|
||||
githubId = 34317;
|
||||
name = "Corey O'Connor";
|
||||
};
|
||||
code-asher = {
|
||||
email = "ash@coder.com";
|
||||
github = "code-asher";
|
||||
githubId = 45609798;
|
||||
name = "Asher";
|
||||
keys = [{
|
||||
fingerprint = "6E3A FA6D 915C C2A4 D26F C53E 7BB4 BA9C 783D 2BBC";
|
||||
}];
|
||||
};
|
||||
CodeLongAndProsper90 = {
|
||||
github = "CodeLongAndProsper90";
|
||||
githubId = 50145141;
|
||||
|
@ -868,7 +868,7 @@ class Machine:
|
||||
# to match multiline regexes.
|
||||
console = io.StringIO()
|
||||
|
||||
def console_matches() -> bool:
|
||||
def console_matches(_: Any) -> bool:
|
||||
nonlocal console
|
||||
try:
|
||||
# This will return as soon as possible and
|
||||
@ -884,7 +884,7 @@ class Machine:
|
||||
if timeout is not None:
|
||||
retry(console_matches, timeout)
|
||||
else:
|
||||
while not console_matches():
|
||||
while not console_matches(False):
|
||||
pass
|
||||
|
||||
def send_key(
|
||||
|
@ -23,6 +23,12 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
systemd.packages = [ pkgs.cfs-zen-tweaks ];
|
||||
|
||||
systemd.services.set-cfs-tweak.wantedBy = [ "multi-user.target" "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
|
||||
systemd.services.set-cfs-tweaks.wantedBy = [
|
||||
"multi-user.target"
|
||||
"suspend.target"
|
||||
"hibernate.target"
|
||||
"hybrid-sleep.target"
|
||||
"suspend-then-hibernate.target"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
||||
name = "systemd-initrd-vconsole";
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
boot.kernelParams = [ "rd.systemd.unit=rescue.target" ];
|
||||
boot.kernelParams = lib.mkAfter [ "rd.systemd.unit=rescue.target" "loglevel=3" "udev.log_level=3" "systemd.log_level=warning" ];
|
||||
|
||||
boot.initrd.systemd = {
|
||||
enable = true;
|
||||
@ -20,14 +20,23 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
||||
machine.start()
|
||||
machine.wait_for_console_text("Press Enter for maintenance")
|
||||
machine.send_console("\n")
|
||||
machine.wait_for_console_text("Logging in with home")
|
||||
|
||||
# Wait for shell to become ready
|
||||
for _ in range(300):
|
||||
machine.send_console("printf '%s to receive commands:\\n' Ready\n")
|
||||
try:
|
||||
machine.wait_for_console_text("Ready to receive commands:", timeout=1)
|
||||
break
|
||||
except Exception:
|
||||
continue
|
||||
else:
|
||||
raise RuntimeError("Rescue shell never became ready")
|
||||
|
||||
# Check keymap
|
||||
machine.send_console("(printf '%s to receive text: \\n' Ready && read text && echo \"$text\") </dev/tty1\n")
|
||||
machine.send_console("(printf '%s to receive text:\\n' Ready && read text && echo \"$text\") </dev/tty1\n")
|
||||
machine.wait_for_console_text("Ready to receive text:")
|
||||
for key in "asdfjkl;\n":
|
||||
machine.send_key(key)
|
||||
machine.wait_for_console_text("arstneio")
|
||||
machine.send_console("systemctl poweroff\n")
|
||||
'';
|
||||
})
|
||||
|
@ -847,8 +847,8 @@ let
|
||||
mktplcRef = {
|
||||
name = "vscode-markdownlint";
|
||||
publisher = "DavidAnson";
|
||||
version = "0.50.0";
|
||||
sha256 = "sha256-F+lryIhSudDz68t1eGrfqI8EuoUUOWU5LfWj0IRCQyY=";
|
||||
version = "0.51.0";
|
||||
sha256 = "sha256-Xtr8cqcPrcrKpJBxQcY1j9Gl4CC6U3ZazS4bdBtdzUk=";
|
||||
};
|
||||
meta = {
|
||||
changelog = "https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint/changelog";
|
||||
|
@ -45,9 +45,9 @@
|
||||
}
|
||||
},
|
||||
"ungoogled-chromium": {
|
||||
"version": "114.0.5735.106",
|
||||
"sha256": "0jihf4gv7n2kkp78n42ha4ick8mzixb4xrfdk84iqazmifrb066z",
|
||||
"sha256bin64": "1zlw9gjb2fmjf1d952adqg07cyq60yck0aarz20lcvv2jzb7s46i",
|
||||
"version": "114.0.5735.133",
|
||||
"sha256": "0qnj4gr4b9gmla1hbz1ir64hfmpc45vzkg0hmw9h6m72r4gfr2c2",
|
||||
"sha256bin64": "0gk9l1xspbqdxv9q16zdcrrr6bxx677cnz7vv4pgg85k1pwhyw3g",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2023-04-19",
|
||||
@ -56,8 +56,8 @@
|
||||
"sha256": "01xrh9m9m6x8lz0vxwdw2mrhrvnw93zpg09hwdhqakj06agf4jjk"
|
||||
},
|
||||
"ungoogled-patches": {
|
||||
"rev": "114.0.5735.106-1",
|
||||
"sha256": "1aac1711mbr3jwxbnjkl5kxvb64bhwnw0ls1wj7w7pmka5gmardv"
|
||||
"rev": "114.0.5735.133-1",
|
||||
"sha256": "1i9ql4b2rn9jryyc3hfr9kh8ccf5a4gvpwsp9lnp9jc2gryrv70y"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
184
pkgs/development/compilers/opensmalltalk-vm/default.nix
Normal file
184
pkgs/development/compilers/opensmalltalk-vm/default.nix
Normal file
@ -0,0 +1,184 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, alsa-lib
|
||||
, coreutils
|
||||
, file
|
||||
, freetype
|
||||
, gnugrep
|
||||
, libpulseaudio
|
||||
, libtool
|
||||
, libuuid
|
||||
, openssl
|
||||
, pango
|
||||
, pkg-config
|
||||
, xorg
|
||||
}:
|
||||
let
|
||||
buildVM =
|
||||
{
|
||||
# VM-specific information, manually extracted from building/<platformDir>/<vmName>/build/mvm
|
||||
platformDir
|
||||
, vmName
|
||||
, scriptName
|
||||
, configureFlagsArray
|
||||
, configureFlags
|
||||
}:
|
||||
let
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenSmalltalk";
|
||||
repo = "opensmalltalk-vm";
|
||||
rev = "202206021410";
|
||||
hash = "sha256-QqElPiJuqD5svFjWrLz1zL0Tf+pHxQ2fPvkVRn2lyBI=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname =
|
||||
let vmNameNoDots = builtins.replaceStrings [ "." ] [ "-" ] vmName;
|
||||
in "opensmalltalk-vm-${platformDir}-${vmNameNoDots}";
|
||||
version = src.rev;
|
||||
|
||||
inherit src;
|
||||
|
||||
postPatch =
|
||||
''
|
||||
vmVersionFiles=$(sed -n 's/^versionfiles="\(.*\)"/\1/p' ./scripts/updateSCCSVersions)
|
||||
for vmVersionFile in $vmVersionFiles; do
|
||||
substituteInPlace "$vmVersionFile" \
|
||||
--replace "\$Date\$" "\$Date: Thu Jan 1 00:00:00 1970 +0000 \$" \
|
||||
--replace "\$URL\$" "\$URL: ${src.url} \$" \
|
||||
--replace "\$Rev\$" "\$Rev: ${src.rev} \$" \
|
||||
--replace "\$CommitHash\$" "\$CommitHash: 000000000000 \$"
|
||||
done
|
||||
patchShebangs --build ./building/${platformDir} scripts
|
||||
substituteInPlace ./platforms/unix/config/mkmf \
|
||||
--replace "/bin/rm" "rm"
|
||||
substituteInPlace ./platforms/unix/config/configure \
|
||||
--replace "/usr/bin/file" "file" \
|
||||
--replace "/usr/bin/pkg-config" "pkg-config" \
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd building/${platformDir}/${vmName}/build
|
||||
# Exits with non-zero code if the check fails, counterintuitively
|
||||
../../../../scripts/checkSCCSversion && exit 1
|
||||
cp ../plugins.int ../plugins.ext .
|
||||
configureFlagsArray=${configureFlagsArray}
|
||||
'';
|
||||
|
||||
configureScript = "../../../../platforms/unix/config/configure";
|
||||
|
||||
configureFlags = [ "--with-scriptname=${scriptName}" ] ++ configureFlags;
|
||||
|
||||
buildFlags = "all";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
file
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
freetype
|
||||
libpulseaudio
|
||||
libtool
|
||||
libuuid
|
||||
openssl
|
||||
pango
|
||||
xorg.libX11
|
||||
xorg.libXrandr
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
rm "$out/squeak"
|
||||
cd "$out/bin"
|
||||
BIN="$(find ../lib -type f -name squeak)"
|
||||
for f in $(find . -type f); do
|
||||
rm "$f"
|
||||
ln -s "$BIN" "$f"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "The cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak.";
|
||||
mainProgram = scriptName;
|
||||
homepage = "https://opensmalltalk.org/";
|
||||
license = with lib.licenses; [ mit ];
|
||||
maintainers = with lib.maintainers; [ jakewaksbaum ];
|
||||
platforms = [ stdenv.targetPlatform.system ];
|
||||
};
|
||||
};
|
||||
|
||||
vmsByPlatform = {
|
||||
"aarch64-linux" = {
|
||||
"squeak-cog-spur" = buildVM {
|
||||
platformDir = "linux64ARMv8";
|
||||
vmName = "squeak.cog.spur";
|
||||
scriptName = "squeak";
|
||||
configureFlagsArray = ''(
|
||||
CFLAGS="-DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1"
|
||||
LIBS="-lrt"
|
||||
)'';
|
||||
configureFlags = [
|
||||
"--with-vmversion=5.0"
|
||||
"--with-src=src/spur64.cog"
|
||||
"--without-npsqueak"
|
||||
"--enable-fast-bitblt"
|
||||
];
|
||||
};
|
||||
|
||||
"squeak-stack-spur" = buildVM {
|
||||
platformDir = "linux64ARMv8";
|
||||
vmName = "squeak.stack.spur";
|
||||
scriptName = "squeak";
|
||||
configureFlagsArray = ''(
|
||||
CFLAGS="-DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -D__ARM_ARCH_ISA_A64 -DARM64 -D__arm__ -D__arm64__ -D__aarch64__"
|
||||
)'';
|
||||
configureFlags = [
|
||||
"--with-vmversion=5.0"
|
||||
"--with-src=src/spur64.stack"
|
||||
"--disable-cogit"
|
||||
"--without-npsqueak"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
"x86_64-linux" = {
|
||||
"newspeak-cog-spur" = buildVM {
|
||||
platformDir = "linux64x64";
|
||||
vmName = "newspeak.cog.spur";
|
||||
scriptName = "newspeak";
|
||||
configureFlagsArray = ''(
|
||||
CFLAGS="-DNDEBUG -DDEBUGVM=0"
|
||||
)'';
|
||||
configureFlags = [
|
||||
"--with-vmversion=5.0"
|
||||
"--with-src=src/spur64.cog.newspeak"
|
||||
"--without-vm-display-fbdev"
|
||||
"--without-npsqueak"
|
||||
];
|
||||
};
|
||||
|
||||
"squeak-cog-spur" = buildVM {
|
||||
platformDir = "linux64x64";
|
||||
vmName = "squeak.cog.spur";
|
||||
scriptName = "squeak";
|
||||
configureFlagsArray = ''(
|
||||
CFLAGS="-DNDEBUG -DDEBUGVM=0 -DCOGMTVM=0"
|
||||
)'';
|
||||
configureFlags = [
|
||||
"--with-vmversion=5.0"
|
||||
"--with-src=src/spur64.cog"
|
||||
"--without-npsqueak"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
platform = stdenv.targetPlatform.system;
|
||||
in
|
||||
vmsByPlatform.${platform} or
|
||||
(throw "Unsupported platform ${platform}: only the following platforms are supported: ${builtins.attrNames vmsByPlatform}")
|
@ -1,7 +1,7 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, fixDarwinDylibNames
|
||||
}:
|
||||
|
||||
@ -16,31 +16,13 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g=";
|
||||
};
|
||||
|
||||
# replace faulty macos detection
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
sed -i 's/^IS_APPLE := .*$/IS_APPLE := 1/' Makefile
|
||||
'';
|
||||
|
||||
configurePhase = "patchShebangs make.sh ";
|
||||
buildPhase = "PREFIX=$out ./make.sh";
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
# first remove fuzzing steps from check target
|
||||
substituteInPlace Makefile --replace "fuzztest fuzzallcorp" ""
|
||||
make check
|
||||
'';
|
||||
|
||||
installPhase = (lib.optionalString stdenv.isDarwin "HOMEBREW_CAPSTONE=1 ")
|
||||
+ "PREFIX=$out ./make.sh install";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
cmake
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
fixDarwinDylibNames
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Advanced disassembly library";
|
||||
|
@ -16,17 +16,11 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha512-f7tBgIykcIdkwcFjBKk5ooD/5Bsyrd/0OFr7LNCwWFYeE4DH3XA7UR7YjArkwqUVCVBByr82EOaacw0g1blOkw==";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/raspberrypi/userland/pull/670
|
||||
url = "https://github.com/raspberrypi/userland/commit/37cb44f314ab1209fe2a0a2449ef78893b1e5f62.patch";
|
||||
sha256 = "1fbrbkpc4cc010ji8z4ll63g17n6jl67kdy62m74bhlxn72gg9rw";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
cmakeFlags = [
|
||||
(if (stdenv.hostPlatform.isAarch64) then "-DARM64=ON" else "-DARM64=OFF")
|
||||
# -DARM64=ON disables all targets that only build on 32-bit ARM; this allows
|
||||
# the package to build on aarch64 and other architectures
|
||||
"-DARM64=${if stdenv.hostPlatform.isAarch32 then "OFF" else "ON"}"
|
||||
"-DVMCS_INSTALL_PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
|
@ -22,14 +22,14 @@
|
||||
, python3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
version = "1.45.0";
|
||||
pname = "libuv";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
owner = "libuv";
|
||||
repo = "libuv";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-qKw9QFR24Uw7pVA9isPH8Va+9/5DYuqXz6l6jWcXn+4=";
|
||||
};
|
||||
|
||||
@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
|
||||
"shutdown_close_pipe"
|
||||
];
|
||||
tdRegexp = lib.concatStringsSep "\\|" toDisable;
|
||||
in lib.optionalString doCheck ''
|
||||
in lib.optionalString (finalAttrs.doCheck) ''
|
||||
sed '/${tdRegexp}/d' -i test/test-list.h
|
||||
'';
|
||||
|
||||
@ -112,10 +112,10 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
description = "A multi-platform support library with a focus on asynchronous I/O";
|
||||
homepage = "https://libuv.org/";
|
||||
changelog = "https://github.com/libuv/libuv/blob/v${version}/ChangeLog";
|
||||
changelog = "https://github.com/libuv/libuv/blob/v${finalAttrs.version}/ChangeLog";
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.all;
|
||||
license = with licenses; [ mit isc bsd2 bsd3 cc-by-40 ];
|
||||
};
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Benes <nbenes.gh@xandea.de>
|
||||
Date: Mon, 22 May 2023 09:25:27 +0200
|
||||
Subject: [PATCH] Fix pkg-config paths
|
||||
|
||||
|
||||
diff --git a/libxisf.pc.in b/libxisf.pc.in
|
||||
index b0b8b53..944b068 100644
|
||||
--- a/libxisf.pc.in
|
||||
+++ b/libxisf.pc.in
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix="@CMAKE_INSTALL_PREFIX@"
|
||||
exec_prefix="${prefix}"
|
||||
-libdir="${exec_prefix}/@CMAKE_INSTALL_LIBDIR@"
|
||||
-includedir="${prefix}/@CMAKE_INSTALL_INCLUDEDIR@"
|
||||
+libdir="@CMAKE_INSTALL_FULL_LIBDIR@"
|
||||
+includedir="@CMAKE_INSTALL_FULL_INCLUDEDIR@"
|
||||
|
||||
Name: @PROJECT_NAME@
|
||||
Description: @CMAKE_PROJECT_DESCRIPTION@
|
||||
--
|
||||
2.38.5
|
||||
|
@ -10,16 +10,20 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libxisf";
|
||||
version = "0.2.3";
|
||||
version = "0.2.8";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "gitea.nouspiro.space";
|
||||
owner = "nou";
|
||||
repo = "libXISF";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-u5EYnRO2rUV8ofLL9qfACeVvVbWXEXpkqh2Q4OOxpaQ=";
|
||||
hash = "sha256-YB97vMz2+cFRYq8x2Su3Eh952U6kGIVLYV7kDEd5S8g=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-Fix-pkg-config-paths.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
|
81
pkgs/development/tools/language-servers/nixd/default.nix
Normal file
81
pkgs/development/tools/language-servers/nixd/default.nix
Normal file
@ -0,0 +1,81 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, boost182
|
||||
, gtest
|
||||
, libbacktrace
|
||||
, lit
|
||||
, llvmPackages
|
||||
, meson
|
||||
, ninja
|
||||
, nix
|
||||
, nixpkgs-fmt
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nixd";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nix-community";
|
||||
repo = "nixd";
|
||||
rev = version;
|
||||
hash = "sha256-kTDPbsQi9gzFAFkiAPF+V3yI1WBmILEnnsqdgHMqXJA=";
|
||||
};
|
||||
|
||||
mesonBuildType = "release";
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
lit
|
||||
nixpkgs-fmt
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libbacktrace
|
||||
nix
|
||||
gtest
|
||||
boost182
|
||||
llvmPackages.llvm
|
||||
];
|
||||
|
||||
env.CXXFLAGS = "-include ${nix.dev}/include/nix/config.h";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
dirs=(store var var/nix var/log/nix etc home)
|
||||
|
||||
for dir in $dirs; do
|
||||
mkdir -p "$TMPDIR/$dir"
|
||||
done
|
||||
|
||||
export NIX_STORE_DIR=$TMPDIR/store
|
||||
export NIX_LOCALSTATE_DIR=$TMPDIR/var
|
||||
export NIX_STATE_DIR=$TMPDIR/var/nix
|
||||
export NIX_LOG_DIR=$TMPDIR/var/log/nix
|
||||
export NIX_CONF_DIR=$TMPDIR/etc
|
||||
export HOME=$TMPDIR/home
|
||||
|
||||
# Disable nixd regression tests, because it uses some features provided by
|
||||
# nix, and does not correctly work in the sandbox
|
||||
meson test --print-errorlogs server regression/nix-ast-dump
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Nix language server";
|
||||
homepage = "https://github.com/nix-community/nixd";
|
||||
license = lib.licenses.lgpl3Plus;
|
||||
maintainers = with lib.maintainers; [ inclyc ];
|
||||
platforms = lib.platforms.unix;
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
}
|
@ -9,12 +9,12 @@ runCommand "documentation-highlighter" {
|
||||
};
|
||||
src = lib.sources.cleanSourceWith {
|
||||
src = ./.;
|
||||
filter = path: type: lib.elem path (map toString [
|
||||
./highlight.pack.js
|
||||
./LICENSE
|
||||
./loader.js
|
||||
./mono-blue.css
|
||||
./README.md
|
||||
filter = path: type: lib.elem (baseNameOf path) ([
|
||||
"highlight.pack.js"
|
||||
"LICENSE"
|
||||
"loader.js"
|
||||
"mono-blue.css"
|
||||
"README.md"
|
||||
]);
|
||||
};
|
||||
} ''
|
||||
|
@ -17,21 +17,16 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "HRR2tdjNmWyrpbcMlihSdb/7g/tHma3YyXogQpRCVyo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs set-cfs-zen-tweaks.bash
|
||||
chmod +x set-cfs-zen-tweaks.bash
|
||||
preConfigure = ''
|
||||
substituteInPlace set-cfs-zen-tweaks.bash \
|
||||
--replace '$(gawk' '$(${gawk}/bin/gawk'
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
gawk
|
||||
];
|
||||
preFixup = ''
|
||||
chmod +x $out/lib/cfs-zen-tweaks/set-cfs-zen-tweaks.bash
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tweak Linux CPU scheduler for desktop responsiveness";
|
||||
|
@ -1,34 +0,0 @@
|
||||
{ stdenv, lib, fetchFromGitHub, kernel }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "sch_cake";
|
||||
version = "unstable-2017-07-16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dtaht";
|
||||
repo = "sch_cake";
|
||||
rev = "e641a56f27b6848736028f87eda65ac3df9f99f7";
|
||||
sha256 = "08582jy01j32b3mj8hf6m8687qrcz64zv2m236j24inlkmd94q21";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "pic" ];
|
||||
|
||||
makeFlags = [
|
||||
"KERNEL_VERSION=${kernel.version}"
|
||||
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -v -m 644 -D sch_cake.ko \
|
||||
$out/lib/modules/${kernel.modDirVersion}/kernel/net/sched/sch_cake.ko
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The cake qdisc scheduler";
|
||||
homepage = "https://www.bufferbloat.net/projects/codel/wiki/Cake/";
|
||||
license = with licenses; [ bsd3 gpl2 ];
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
platforms = platforms.linux;
|
||||
broken = lib.versionAtLeast kernel.version "4.13";
|
||||
};
|
||||
}
|
@ -1,14 +1,8 @@
|
||||
--- ./ci/build/build-vscode.sh
|
||||
+++ ./ci/build/build-vscode.sh
|
||||
@@ -45,14 +45,12 @@
|
||||
# Set the commit Code will embed into the product.json. We need to do this
|
||||
# since Code tries to get the commit from the `.git` directory which will fail
|
||||
# as it is a submodule.
|
||||
- export VSCODE_DISTRO_COMMIT
|
||||
- VSCODE_DISTRO_COMMIT=$(git rev-parse HEAD)
|
||||
+ export VSCODE_DISTRO_COMMIT=none
|
||||
|
||||
# Add the date, our name, links, and enable telemetry (this just makes
|
||||
diff --git a/ci/build/build-vscode.sh b/ci/build/build-vscode.sh
|
||||
index a72549fb..3aed1ad5 100755
|
||||
--- a/ci/build/build-vscode.sh
|
||||
+++ b/ci/build/build-vscode.sh
|
||||
@@ -58,7 +58,6 @@ main() {
|
||||
# telemetry available; telemetry can still be disabled by flag or setting).
|
||||
# This needs to be done before building as Code will read this file and embed
|
||||
# it into the client-side code.
|
||||
@ -16,7 +10,7 @@
|
||||
cp product.json product.original.json # Since jq has no inline edit.
|
||||
jq --slurp '.[0] * .[1]' product.original.json <(
|
||||
cat << EOF
|
||||
@@ -99,7 +97,6 @@
|
||||
@@ -105,7 +104,6 @@ EOF
|
||||
# Reset so if you develop after building you will not be stuck with the wrong
|
||||
# commit (the dev client will use `oss-dev` but the dev server will still use
|
||||
# product.json which will have `stable-$commit`).
|
||||
|
@ -54,17 +54,19 @@ let
|
||||
sed -i 's/${version}/${esbuild'.version}/g' ${path}/node_modules/esbuild/lib/main.js
|
||||
ln -s -f ${esbuild'}/bin/esbuild ${path}/node_modules/esbuild/bin/esbuild
|
||||
'';
|
||||
|
||||
commit = "2798322b03e7f446f59c5142215c11711ed7a427";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "code-server";
|
||||
version = "4.12.0";
|
||||
version = "4.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "coder";
|
||||
repo = "code-server";
|
||||
rev = "v${finalAttrs.version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-PQp5dji2Ynp+LJRWBka41umwe1/IR76C+at/wyOWGcI=";
|
||||
hash = "sha256-4hkKGQU9G3CllD+teWXnYoHaY3YdDz25fwaMUS5OlfM=";
|
||||
};
|
||||
|
||||
yarnCache = stdenv.mkDerivation {
|
||||
@ -92,7 +94,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "sha256-4Vr9u3+W/IhbbTc39jyDyDNQODlmdF+M/N8oJn0Z4+w=";
|
||||
outputHash = "sha256-xLcrOVhKC0cOPcS5XwIMyv1KiEE0azZ1z+wS9PPKjAQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -120,7 +122,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
patches = [
|
||||
# remove git calls from vscode build script
|
||||
# Remove all git calls from the VS Code build script except `git rev-parse
|
||||
# HEAD` which is replaced in postPatch with the commit.
|
||||
./build-vscode-nogit.patch
|
||||
];
|
||||
|
||||
@ -130,8 +133,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
patchShebangs ./ci
|
||||
|
||||
# inject git commit
|
||||
substituteInPlace ci/build/build-release.sh \
|
||||
--replace '$(git rev-parse HEAD)' "$commit"
|
||||
substituteInPlace ./ci/build/build-vscode.sh \
|
||||
--replace '$(git rev-parse HEAD)' "${commit}"
|
||||
substituteInPlace ./ci/build/build-release.sh \
|
||||
--replace '$(git rev-parse HEAD)' "${commit}"
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
@ -232,8 +237,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
-execdir ln -s ${ripgrep}/bin/rg {}/bin/rg \;
|
||||
|
||||
# run postinstall scripts after patching
|
||||
find ./lib/vscode -path "*node_modules" -prune -o \
|
||||
-path "./*/*/*/*/*" -name "yarn.lock" -printf "%h\n" | \
|
||||
find ./lib/vscode \( -path "*/node_modules/*" -or -path "*/extensions/*" \) \
|
||||
-and -type f -name "yarn.lock" -printf "%h\n" | \
|
||||
xargs -I {} sh -c 'jq -e ".scripts.postinstall" {}/package.json >/dev/null && yarn --cwd {} postinstall --frozen-lockfile --offline || true'
|
||||
|
||||
# build code-server
|
||||
@ -242,6 +247,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# build vscode
|
||||
VERSION=${finalAttrs.version} yarn build:vscode
|
||||
|
||||
# inject version into package.json
|
||||
jq --slurp '.[0] * .[1]' ./package.json <(
|
||||
cat << EOF
|
||||
{
|
||||
"version": "${finalAttrs.version}"
|
||||
}
|
||||
EOF
|
||||
) | sponge ./package.json
|
||||
|
||||
# create release
|
||||
yarn release
|
||||
|
||||
@ -283,7 +297,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
homepage = "https://github.com/coder/code-server";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ offline henkery ];
|
||||
maintainers = with lib.maintainers; [ offline henkery code-asher ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
})
|
||||
|
@ -24,9 +24,9 @@ if ("$latest_version" === "$current_version") {
|
||||
const package_json = $(curl -qf $source/package.json)
|
||||
echo $package_json > $directory/package.json
|
||||
|
||||
const server_tarball_meta = $(nix-prefetch-github $owner $server_repo --rev $latest_rev)
|
||||
const server_tarball_meta = $(nix-prefetch-github $owner $server_repo --rev $latest_rev --fetch-submodules)
|
||||
const server_tarball_hash = "sha256-$(echo $server_tarball_meta | jq -r '.sha256')"
|
||||
const ui_tarball_meta = $(nix-prefetch-github $owner $ui_repo --rev $latest_rev)
|
||||
const ui_tarball_meta = $(nix-prefetch-github $owner $ui_repo --rev $latest_rev --fetch-submodules)
|
||||
const ui_tarball_hash = "sha256-$(echo $ui_tarball_meta | jq -r '.sha256')"
|
||||
|
||||
jq ".version = \"$latest_version\" | \
|
||||
@ -35,12 +35,12 @@ if ("$latest_version" === "$current_version") {
|
||||
.\"serverCargoSha256\" = \"\" | \
|
||||
.\"uiYarnDepsSha256\" = \"\"" $directory/pin.json | sponge $directory/pin.json
|
||||
|
||||
const new_cargo_sha256 = $(nix-build -A lemmy-server 2>&1 | \
|
||||
const new_cargo_sha256 = $(nix-build $directory/../../../.. -A lemmy-server 2>&1 | \
|
||||
tail -n 2 | \
|
||||
head -n 1 | \
|
||||
sd '\s+got:\s+' '')
|
||||
|
||||
const new_offline_cache_sha256 = $(nix-build -A lemmy-ui 2>&1 | \
|
||||
const new_offline_cache_sha256 = $(nix-build $directory/../../../.. -A lemmy-ui 2>&1 | \
|
||||
tail -n 2 | \
|
||||
head -n 1 | \
|
||||
sd '\s+got:\s+' '')
|
||||
|
@ -3,22 +3,22 @@
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, makeWrapper
|
||||
, dart-sass-embedded
|
||||
, dart-sass
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "shopware-cli";
|
||||
version = "0.1.78";
|
||||
version = "0.2.0";
|
||||
src = fetchFromGitHub {
|
||||
repo = "shopware-cli";
|
||||
owner = "FriendsOfShopware";
|
||||
rev = version;
|
||||
hash = "sha256-IJOT4hnh/ufF8x9EXAJ6TaXVD3qoyv+NqDXqH9XB9C4=";
|
||||
hash = "sha256-IWp4cgZd6td2hOMd2r4v3MI5kY1PqLhLGAIJ3VLvgEA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
||||
|
||||
vendorHash = "sha256-MoqLxEPxApxMyGKGiPfdehdmKacpwL0BqRP7rEC0TdY=";
|
||||
vendorHash = "sha256-JTjz39zw5Il37V6V7mOQuCYiPJnnizBhkBHBAg2DvSU=";
|
||||
|
||||
postInstall = ''
|
||||
export HOME="$(mktemp -d)"
|
||||
@ -30,7 +30,7 @@ buildGoModule rec {
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram $out/bin/shopware-cli \
|
||||
--prefix PATH : ${lib.makeBinPath [ dart-sass-embedded ]}
|
||||
--prefix PATH : ${lib.makeBinPath [ dart-sass ]}
|
||||
'';
|
||||
|
||||
ldflags = [
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
let
|
||||
# These settings are found in the Makefile, but there seems to be no
|
||||
# way to select one ore the other setting other than editing the file
|
||||
# way to select one or the other setting other than editing the file
|
||||
# manually, so we have to duplicate the know how here.
|
||||
systemFlags = lib.optionalString stdenv.isDarwin ''
|
||||
CFLAGS="-O2 -Wall -fomit-frame-pointer -no-cpp-precomp"
|
||||
@ -18,13 +18,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tree";
|
||||
version = "2.0.4";
|
||||
version = "2.1.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "OldManProgrammer";
|
||||
repo = "unix-tree";
|
||||
rev = version;
|
||||
sha256 = "sha256-2voXL31JHh09yBBLuHhYyZsUapiPVF/cgRmTU6wSXk4=";
|
||||
sha256 = "sha256-aPz1ROUeAKDmMjEtAaL2AguF54/CbIYWpL4Qovv2ftQ=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -16672,7 +16672,10 @@ with pkgs;
|
||||
|
||||
ograc = callPackage ../development/tools/rust/ograc { };
|
||||
|
||||
opensmalltalk-vm = callPackage ../development/compilers/opensmalltalk-vm { };
|
||||
|
||||
ravedude = callPackage ../development/tools/rust/ravedude { };
|
||||
|
||||
rhack = callPackage ../development/tools/rust/rhack { };
|
||||
roogle = callPackage ../development/tools/rust/roogle { };
|
||||
rustfmt = rustPackages.rustfmt;
|
||||
@ -17798,6 +17801,11 @@ with pkgs;
|
||||
|
||||
nil = callPackage ../development/tools/language-servers/nil { };
|
||||
|
||||
nixd = callPackage ../development/tools/language-servers/nixd {
|
||||
llvmPackages = llvmPackages_16;
|
||||
nix = nixVersions.nix_2_16;
|
||||
};
|
||||
|
||||
nls = callPackage ../development/tools/language-servers/nls { };
|
||||
|
||||
pylyzer = callPackage ../development/tools/language-servers/pylyzer { };
|
||||
|
@ -482,8 +482,6 @@ in {
|
||||
|
||||
prl-tools = callPackage ../os-specific/linux/prl-tools { };
|
||||
|
||||
sch_cake = callPackage ../os-specific/linux/sch_cake { };
|
||||
|
||||
isgx = callPackage ../os-specific/linux/isgx { };
|
||||
|
||||
rr-zen_workaround = callPackage ../development/tools/analysis/rr/zen_workaround.nix { };
|
||||
@ -563,6 +561,7 @@ in {
|
||||
|
||||
} // lib.optionalAttrs config.allowAliases {
|
||||
ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18;
|
||||
sch_cake = throw "sch_cake was added in mainline kernel version 4.19"; # Added 2023-06-14
|
||||
xmm7360-pci = throw "Support for the XMM7360 WWAN card was added to the iosm kmod in mainline kernel version 5.18";
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user