commit
3328bc9666
@ -0,0 +1,21 @@ |
||||
# Setup hook for checking whether Python imports succeed |
||||
echo "Sourcing neovim-require-check-hook.sh" |
||||
|
||||
neovimRequireCheckHook () { |
||||
echo "Executing neovimRequireCheckHook" |
||||
|
||||
if [ -n "$nvimRequireCheck" ]; then |
||||
echo "Check whether the following module can be imported: $nvimRequireCheck" |
||||
|
||||
# editorconfig-checker-disable |
||||
export HOME="$TMPDIR" |
||||
@nvimBinary@ -es --headless -n -u NONE -i NONE --clean -V1 \ |
||||
--cmd "set rtp+=$out" \ |
||||
--cmd "lua require('$nvimRequireCheck')" |
||||
fi |
||||
} |
||||
|
||||
echo "Using neovimRequireCheckHook" |
||||
preDistPhases+=" neovimRequireCheckHook" |
||||
|
||||
|
@ -0,0 +1,16 @@ |
||||
{ runCommand }: |
||||
|
||||
firmware: |
||||
|
||||
runCommand "${firmware.name}-xz" {} '' |
||||
mkdir -p $out/lib |
||||
(cd ${firmware} && find lib/firmware -type d -print0) | |
||||
(cd $out && xargs -0 mkdir -v --) |
||||
(cd ${firmware} && find lib/firmware -type f -print0) | |
||||
(cd $out && xargs -0tP "$NIX_BUILD_CORES" -n1 \ |
||||
sh -c 'xz -9c -T1 -C crc32 --lzma2=dict=2MiB "${firmware}/$1" > "$1.xz"' --) |
||||
(cd ${firmware} && find lib/firmware -type l) | while read link; do |
||||
target="$(readlink "${firmware}/$link")" |
||||
ln -vs -- "''${target/^${firmware}/$out}.xz" "$out/$link.xz" |
||||
done |
||||
'' |
@ -0,0 +1,56 @@ |
||||
{ lib, pkgs, runCommand, prisma }: |
||||
|
||||
let |
||||
inherit (prisma) packageName; |
||||
prismaMajorVersion = lib.versions.majorMinor prisma.version; |
||||
enginesMajorVersion = lib.versions.majorMinor pkgs.prisma-engines.version; |
||||
in |
||||
|
||||
runCommand "${packageName}-tests" { |
||||
nativeBuildInputs = with pkgs; [ prisma sqlite-interactive ]; |
||||
meta.timeout = 60; |
||||
} |
||||
'' |
||||
mkdir $out |
||||
cd $out |
||||
|
||||
if [ "${prismaMajorVersion}" != "${enginesMajorVersion}" ]; then |
||||
echo "nodePackages.prisma in version ${prismaMajorVersion} and prisma-engines in ${enginesMajorVersion}. Major versions must match." |
||||
exit 1 |
||||
fi |
||||
|
||||
# Ensure CLI runs |
||||
prisma --help > /dev/null |
||||
|
||||
# Init a new project |
||||
prisma init > /dev/null |
||||
|
||||
# Create a simple data model |
||||
cat << EOF > prisma/schema.prisma |
||||
datasource db { |
||||
provider = "sqlite" |
||||
url = "file:test.db" |
||||
} |
||||
|
||||
generator js { |
||||
provider = "prisma-client-js" |
||||
} |
||||
|
||||
model A { |
||||
id Int @id @default(autoincrement()) |
||||
b String @default("foo") |
||||
} |
||||
EOF |
||||
|
||||
# Format |
||||
prisma format > /dev/null |
||||
|
||||
# Create the database |
||||
prisma db push --skip-generate > /dev/null |
||||
|
||||
# The database file should exist and be a SQLite database |
||||
sqlite3 prisma/test.db "SELECT id, b FROM A" > /dev/null |
||||
|
||||
# Introspect the database |
||||
prisma db pull > /dev/null |
||||
'' |
@ -0,0 +1,26 @@ |
||||
{ lib, buildPythonPackage, fetchFromGitHub, regex, requests, tqdm, numpy |
||||
, toposort, tensorflow }: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "gpt-2-simple"; |
||||
version = "0.8.1"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "minimaxir"; |
||||
repo = "gpt-2-simple"; |
||||
rev = "v${version}"; |
||||
sha256 = "sha256-WwD4sDcc28zXEOISJsq8e+rgaNrrgIy79Wa4J3E7Ovc="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ regex requests tqdm numpy toposort tensorflow ]; |
||||
|
||||
dontCheck = true; # no tests in upstream |
||||
|
||||
meta = with lib; { |
||||
description = |
||||
"Easily retrain OpenAI's GPT-2 text-generating model on new texts"; |
||||
homepage = "https://github.com/minimaxir/gpt-2-simple"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ ckie ]; |
||||
}; |
||||
} |
@ -0,0 +1,39 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchFromGitHub |
||||
, pytestCheckHook |
||||
, scikit-learn |
||||
, pytorch |
||||
}: |
||||
|
||||
let |
||||
pname = "py-deprecate"; |
||||
version = "0.3.2"; |
||||
in |
||||
buildPythonPackage { |
||||
inherit pname version; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "Borda"; |
||||
repo = "pyDeprecate"; |
||||
rev = "v${version}"; |
||||
hash = "sha256-84RmQvLxwtLPQk3hX7Q6eeJeejhrO3t+mc95W1E85Fg="; |
||||
}; |
||||
|
||||
checkInputs = [ |
||||
pytestCheckHook |
||||
scikit-learn |
||||
]; |
||||
|
||||
pythonImportsCheck = [ "deprecate" ]; |
||||
|
||||
meta = with lib; { |
||||
description = "A module for marking deprecated functions or classes and re-routing to the new successors' instance. Used by torchmetrics"; |
||||
homepage = "https://borda.github.io/pyDeprecate/"; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ |
||||
SomeoneSerge |
||||
]; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,78 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchFromGitHub |
||||
, cloudpickle |
||||
, scikit-learn |
||||
, scikitimage |
||||
, packaging |
||||
, psutil |
||||
, py-deprecate |
||||
, pytorch |
||||
, pytestCheckHook |
||||
, torchmetrics |
||||
, pytorch-lightning |
||||
}: |
||||
|
||||
let |
||||
pname = "torchmetrics"; |
||||
version = "0.8.1"; |
||||
in |
||||
buildPythonPackage { |
||||
inherit pname version; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "PyTorchLightning"; |
||||
repo = "metrics"; |
||||
rev = "v${version}"; |
||||
hash = "sha256-AryEhYAeC97dO2pgHoz0Y9F//DVdX6RfCa80gI56iz4="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ |
||||
packaging |
||||
py-deprecate |
||||
]; |
||||
|
||||
# Let the user bring their own instance |
||||
buildInputs = [ |
||||
pytorch |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
pytorch-lightning |
||||
scikit-learn |
||||
scikitimage |
||||
cloudpickle |
||||
psutil |
||||
pytestCheckHook |
||||
]; |
||||
|
||||
# A cyclic dependency in: integrations/test_lightning.py |
||||
doCheck = false; |
||||
passthru.tests.check = torchmetrics.overridePythonAttrs (_: { |
||||
doCheck = true; |
||||
}); |
||||
|
||||
disabledTestPaths = [ |
||||
# These require too many "leftpad-level" dependencies |
||||
"tests/text" |
||||
"tests/audio" |
||||
"tests/image" |
||||
|
||||
# A few non-deterministic things like test_check_compute_groups_is_faster |
||||
"tests/bases/test_collections.py" |
||||
]; |
||||
|
||||
pythonImportsCheck = [ |
||||
"torchmetrics" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Machine learning metrics for distributed, scalable PyTorch applications (used in pytorch-lightning)"; |
||||
homepage = "https://torchmetrics.readthedocs.io"; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ |
||||
SomeoneSerge |
||||
]; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,46 @@ |
||||
{ lib |
||||
, rustPlatform |
||||
, fetchFromGitHub |
||||
, pkg-config |
||||
, openssl |
||||
}: |
||||
|
||||
let |
||||
pname = "dump_syms"; |
||||
version = "unstable-2022-05-05"; |
||||
in |
||||
rustPlatform.buildRustPackage { |
||||
inherit pname version; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "mozilla"; |
||||
repo = pname; |
||||
rev = "c2743d59b5aa321ade698f84b90f86b3d35a1b06"; |
||||
hash = "sha256-hWK9KrYqbfrF8b7i33InlTa/XkoZs+h49kUsKeSaAok="; |
||||
}; |
||||
|
||||
cargoSha256 = "sha256:0vsr867nl156wpxpw01bv9fxsp6rhj9vvpz2i2yhx4kjgr1qk1kw"; |
||||
|
||||
nativeBuildInputs = [ |
||||
pkg-config |
||||
]; |
||||
|
||||
buildInputs = [ |
||||
openssl |
||||
]; |
||||
|
||||
checkFlags = [ |
||||
# Disable tests that require network access |
||||
# ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Temporary failure in name resolution" })) }', src/windows/pdb.rs:725:56 |
||||
"--skip windows::pdb::tests::test_ntdll" |
||||
"--skip windows::pdb::tests::test_oleaut32" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
changelog = "https://github.com/mozilla/dump_syms/releases/tag/v${version}"; |
||||
description = "Command-line utility for parsing the debugging information the compiler provides in ELF or stand-alone PDB files"; |
||||
license = licenses.asl20; |
||||
homepage = "https://github.com/mozilla/dump_syms/"; |
||||
maintainers = with maintainers; [ hexa ]; |
||||
}; |
||||
} |
Loading…
Reference in new issue