Merge staging-next into staging
This commit is contained in:
commit
d35b2c4eeb
@ -0,0 +1,49 @@
|
||||
From fbc1488e8da0175e9c9bdf5892f8a65c71f2a266 Mon Sep 17 00:00:00 2001
|
||||
From: Jiajie Chen <c@jia.je>
|
||||
Date: Fri, 15 Jul 2022 18:33:15 +0800
|
||||
Subject: [PATCH] Do not download sources in cmake
|
||||
|
||||
---
|
||||
src/solvers/CMakeLists.txt | 20 +-------------------
|
||||
1 file changed, 1 insertion(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/solvers/CMakeLists.txt b/src/solvers/CMakeLists.txt
|
||||
index 744def486..5b719a78a 100644
|
||||
--- a/src/solvers/CMakeLists.txt
|
||||
+++ b/src/solvers/CMakeLists.txt
|
||||
@@ -106,31 +106,13 @@ elseif("${sat_impl}" STREQUAL "glucose")
|
||||
elseif("${sat_impl}" STREQUAL "cadical")
|
||||
message(STATUS "Building solvers with cadical")
|
||||
|
||||
- download_project(PROJ cadical
|
||||
- URL https://github.com/arminbiere/cadical/archive/rel-1.4.1.tar.gz
|
||||
- PATCH_COMMAND true
|
||||
- COMMAND CXX=${CMAKE_CXX_COMPILER} ./configure -O3 -s CXXFLAGS=-std=c++14
|
||||
- URL_MD5 b44874501a175106424f4bd5de29aa59
|
||||
- )
|
||||
-
|
||||
message(STATUS "Building CaDiCaL")
|
||||
- execute_process(COMMAND make -j WORKING_DIRECTORY ${cadical_SOURCE_DIR})
|
||||
|
||||
target_compile_definitions(solvers PUBLIC
|
||||
SATCHECK_CADICAL HAVE_CADICAL
|
||||
)
|
||||
|
||||
- add_library(cadical STATIC IMPORTED)
|
||||
-
|
||||
- set_target_properties(
|
||||
- cadical
|
||||
- PROPERTIES IMPORTED_LOCATION ${cadical_SOURCE_DIR}/build/libcadical.a
|
||||
- )
|
||||
-
|
||||
- target_include_directories(solvers
|
||||
- PUBLIC
|
||||
- ${cadical_SOURCE_DIR}/src
|
||||
- )
|
||||
+ target_include_directories(solvers PUBLIC ${cadical_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(solvers cadical)
|
||||
elseif("${sat_impl}" STREQUAL "ipasir-cadical")
|
||||
--
|
||||
2.35.1
|
||||
|
82
pkgs/applications/science/logic/cbmc/default.nix
Normal file
82
pkgs/applications/science/logic/cbmc/default.nix
Normal file
@ -0,0 +1,82 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, testers
|
||||
, bison
|
||||
, cadical
|
||||
, cbmc
|
||||
, cmake
|
||||
, flex
|
||||
, makeWrapper
|
||||
, perl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cbmc";
|
||||
version = "5.63.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "diffblue";
|
||||
repo = pname;
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "sha256-4tn3wsmaYdo5/QaZc3MLxVGF0x8dmRKeygF/8A+Ww1o=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
cmake
|
||||
flex
|
||||
perl
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [ cadical ];
|
||||
|
||||
# do not download sources
|
||||
# link existing cadical instead
|
||||
patches = [
|
||||
./0001-Do-not-download-sources-in-cmake.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# do not hardcode gcc
|
||||
substituteInPlace "scripts/bash-autocomplete/extract_switches.sh" \
|
||||
--replace "gcc" "$CC" \
|
||||
--replace "g++" "$CXX"
|
||||
# fix library_check.sh interpreter error
|
||||
patchShebangs .
|
||||
'' + lib.optionalString (!stdenv.cc.isGNU) ''
|
||||
# goto-gcc rely on gcc
|
||||
substituteInPlace "regression/CMakeLists.txt" \
|
||||
--replace "add_subdirectory(goto-gcc)" ""
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# goto-cc expects ls_parse.py in PATH
|
||||
mkdir -p $out/share/cbmc
|
||||
mv $out/bin/ls_parse.py $out/share/cbmc/ls_parse.py
|
||||
chmod +x $out/share/cbmc/ls_parse.py
|
||||
wrapProgram $out/bin/goto-cc \
|
||||
--prefix PATH : "$out/share/cbmc" \
|
||||
'';
|
||||
|
||||
# fix "argument unused during compilation"
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
||||
"-Wno-unused-command-line-argument";
|
||||
|
||||
# TODO: add jbmc support
|
||||
cmakeFlags = [ "-DWITH_JBMC=OFF" "-Dsat_impl=cadical" "-Dcadical_INCLUDE_DIR=${cadical.dev}/include" ];
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = cbmc;
|
||||
command = "cbmc --version";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "CBMC is a Bounded Model Checker for C and C++ programs";
|
||||
homepage = "http://www.cprover.org/cbmc/";
|
||||
license = licenses.bsdOriginal;
|
||||
maintainers = with maintainers; [ jiegec ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -9,13 +9,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fast-downward";
|
||||
version = "21.12.0";
|
||||
version = "22.06.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aibasel";
|
||||
repo = "downward";
|
||||
rev = "release-${version}";
|
||||
sha256 = "sha256-qc+SaUpIYm7bnOZlHH2mdvUaMBB+VRyOCQM/BOoOaPE=";
|
||||
sha256 = "sha256-WzxLUuwZy+oNqmgj0n4Pe1QBYXXAaJqYhT+JSLbmyiM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "janet";
|
||||
version = "1.23.0";
|
||||
version = "1.24.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "janet-lang";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-FQZ9I9ROC1gWGfMCxsNMN3g/arenRtC6LHsOIAKGyuE=";
|
||||
sha256 = "sha256-scc29tS3jiGacHp90tGmn/qnbLscJ4sAOCm8IteXfh4=";
|
||||
};
|
||||
|
||||
# This release fails the test suite on darwin, remove when debugged.
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchpatch
|
||||
, fetchurl
|
||||
, meson
|
||||
, ninja
|
||||
@ -20,6 +21,13 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-9mdzUCiUS2N1rRjxYKZM65P1x9zKqdh1HeNZd3SIosE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.gnome.org/GNOME/babl/-/commit/b05b2826365a7dbc6ca1bf0977b848055cd0cbb6.patch";
|
||||
hash = "sha256-zyDOc6FcVyZeMij1XjJ46XXWLO5MMz9ZqLKjjT6VSCI=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
|
@ -1,13 +1,13 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "entt";
|
||||
version = "3.10.0";
|
||||
version = "3.10.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "skypjack";
|
||||
repo = "entt";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-/4lc+/YiLPxrn+7Z67sEapYY0ocLWHPC8yeYD2VI+64=";
|
||||
sha256 = "sha256-pewAwvNRCBS6rm3AmHthiayGfP71lqkAO+x6rT957Xg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
@ -64,8 +64,12 @@ callPackage ./common.nix { inherit stdenv; } {
|
||||
# store path than that determined when built (as a source for the
|
||||
# bootstrap-tools tarball)
|
||||
# Building from a proper gcc staying in the path where it was installed,
|
||||
# libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
|
||||
# libgcc_s will now be at {gcc}/lib, and gcc's libgcc will be found without
|
||||
# any special hack.
|
||||
# TODO: remove this hack. Things that rely on this hack today:
|
||||
# - dejagnu: during linux bootstrap tcl SIGSEGVs
|
||||
# - clang-wrapper in cross-compilation
|
||||
# Last attempt: https://github.com/NixOS/nixpkgs/pull/36948
|
||||
preInstall = ''
|
||||
if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
|
||||
mkdir -p $out/lib
|
||||
|
@ -16,11 +16,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libzip";
|
||||
version = "1.8.0";
|
||||
version = "1.9.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://libzip.org/download/${pname}-${version}.tar.gz";
|
||||
sha256 = "17l3ygrnbszm3b99dxmw94wcaqpbljzg54h4c0y8ss8aij35bvih";
|
||||
sha256 = "sha256-/Wp/dF3j1pz1YD7cnLM9KJDwGY5BUlXQmHoM8Q2CTG8=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ mkDerivation, fetchurl, makeWrapper, unzip, lib, php }:
|
||||
let
|
||||
pname = "composer";
|
||||
version = "2.3.10";
|
||||
version = "2.4.0";
|
||||
in
|
||||
mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://getcomposer.org/download/${version}/composer.phar";
|
||||
sha256 = "2AgnLyhPqOD4tHBwPhQ4rI82IDC7ydEuKVMCd9dnr/A=";
|
||||
sha256 = "HNx090llkI0OmNAP7so3wjuG2lEXCjoRoVONif9E1N0=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
@ -8,9 +8,11 @@
|
||||
, binutils
|
||||
, buildBazelPackage
|
||||
, buildPythonPackage
|
||||
, cctools
|
||||
, cython
|
||||
, fetchFromGitHub
|
||||
, git
|
||||
, IOKit
|
||||
, jsoncpp
|
||||
, pybind11
|
||||
, setuptools
|
||||
@ -55,8 +57,11 @@ let
|
||||
homepage = "https://github.com/google/jax";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ ndl ];
|
||||
platforms = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||
hydraPlatforms = ["x86_64-linux" ]; # Don't think anybody is checking the darwin builds
|
||||
platforms = platforms.unix;
|
||||
# aarch64-darwin is broken because of https://github.com/bazelbuild/rules_cc/pull/136
|
||||
# however even with that fix applied, it doesn't work for everyone:
|
||||
# https://github.com/NixOS/nixpkgs/pull/184395#issuecomment-1207287129
|
||||
broken = stdenv.isAarch64;
|
||||
};
|
||||
|
||||
cudatoolkit_joined = symlinkJoin {
|
||||
@ -117,6 +122,8 @@ let
|
||||
] ++ lib.optionals cudaSupport [
|
||||
cudatoolkit
|
||||
cudnn
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
IOKit
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -201,9 +208,7 @@ let
|
||||
|
||||
# Make sure Bazel knows about our configuration flags during fetching so that the
|
||||
# relevant dependencies can be downloaded.
|
||||
bazelFetchFlags = bazel-build.bazelBuildFlags;
|
||||
|
||||
bazelBuildFlags = [
|
||||
bazelFlags = [
|
||||
"-c opt"
|
||||
] ++ lib.optional (stdenv.targetPlatform.isx86_64 && stdenv.targetPlatform.isUnix) [
|
||||
"--config=avx_posix"
|
||||
@ -211,6 +216,11 @@ let
|
||||
"--config=cuda"
|
||||
] ++ lib.optional mklSupport [
|
||||
"--config=mkl_open_source_only"
|
||||
] ++ lib.optionals stdenv.cc.isClang [
|
||||
# bazel depends on the compiler frontend automatically selecting these flags based on file
|
||||
# extension but our clang doesn't.
|
||||
# https://github.com/NixOS/nixpkgs/issues/150655
|
||||
"--cxxopt=-x" "--cxxopt=c++" "--host_cxxopt=-x" "--host_cxxopt=c++"
|
||||
];
|
||||
|
||||
fetchAttrs = {
|
||||
@ -218,7 +228,7 @@ let
|
||||
if cudaSupport then
|
||||
"sha256-Ald+vplRx/DDG/7TfHAqD4Gktb1BGnf7FSCCJzSI0eo="
|
||||
else
|
||||
"sha256-6acSbBNcUBw177HMVOmpV7pUfP1aFSe5cP6/zWFdGFo=";
|
||||
"sha256-eK5IjTAncDarkWYKnXrEo7kw7J7iOH7in2L2GabnFYo=";
|
||||
};
|
||||
|
||||
buildAttrs = {
|
||||
@ -226,8 +236,8 @@ let
|
||||
|
||||
# Note: we cannot do most of this patching at `patch` phase as the deps are not available yet.
|
||||
# 1) Fix pybind11 include paths.
|
||||
# 2) Force static protobuf linkage to prevent crashes on loading multiple extensions
|
||||
# in the same python program due to duplicate protobuf DBs.
|
||||
# 2) Link protobuf from nixpkgs (through TF_SYSTEM_LIBS when using gcc) to prevent crashes on
|
||||
# loading multiple extensions in the same python program due to duplicate protobuf DBs.
|
||||
# 3) Patch python path in the compiler driver.
|
||||
# 4) Patch tensorflow sources to work with later versions of protobuf. See
|
||||
# https://github.com/google/jax/issues/9534. Note that this should be
|
||||
@ -236,13 +246,25 @@ let
|
||||
for src in ./jaxlib/*.{cc,h}; do
|
||||
sed -i 's@include/pybind11@pybind11@g' $src
|
||||
done
|
||||
sed -i 's@-lprotobuf@-l:libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
|
||||
sed -i 's@-lprotoc@-l:libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
|
||||
substituteInPlace ../output/external/org_tensorflow/tensorflow/compiler/xla/python/pprof_profile_builder.cc \
|
||||
--replace "status.message()" "std::string{status.message()}"
|
||||
substituteInPlace ../output/external/rules_cc/cc/private/toolchain/osx_cc_wrapper.sh.tpl \
|
||||
--replace "/usr/bin/install_name_tool" "${cctools}/bin/install_name_tool"
|
||||
substituteInPlace ../output/external/rules_cc/cc/private/toolchain/unix_cc_configure.bzl \
|
||||
--replace "/usr/bin/libtool" "${cctools}/bin/libtool"
|
||||
'' + lib.optionalString cudaSupport ''
|
||||
patchShebangs ../output/external/org_tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl
|
||||
'';
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# Framework search paths aren't added by bintools hook
|
||||
# https://github.com/NixOS/nixpkgs/pull/41914
|
||||
export NIX_LDFLAGS+=" -F${IOKit}/Library/Frameworks"
|
||||
'' + (if stdenv.cc.isGNU then ''
|
||||
sed -i 's@-lprotobuf@-l:libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
|
||||
sed -i 's@-lprotoc@-l:libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
|
||||
'' else if stdenv.cc.isClang then ''
|
||||
sed -i 's@-lprotobuf@${pkgs.protobuf}/lib/libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
|
||||
sed -i 's@-lprotoc@${pkgs.protobuf}/lib/libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
|
||||
'' else throw "Unsupported stdenv.cc: ${stdenv.cc}");
|
||||
|
||||
installPhase = ''
|
||||
./bazel-bin/build/build_wheel --output_path=$out --cpu=${stdenv.targetPlatform.linuxArch}
|
||||
@ -251,13 +273,21 @@ let
|
||||
|
||||
inherit meta;
|
||||
};
|
||||
platformTag =
|
||||
if stdenv.targetPlatform.isLinux then
|
||||
"manylinux2010_${stdenv.targetPlatform.linuxArch}"
|
||||
else if stdenv.system == "x86_64-darwin" then
|
||||
"macosx_10_9_${stdenv.targetPlatform.linuxArch}"
|
||||
else if stdenv.system == "aarch64-darwin" then
|
||||
"macosx_11_0_${stdenv.targetPlatform.linuxArch}"
|
||||
else throw "Unsupported target platform: ${stdenv.targetPlatform}";
|
||||
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit meta pname version;
|
||||
format = "wheel";
|
||||
|
||||
src = "${bazel-build}/jaxlib-${version}-cp${builtins.replaceStrings ["."] [""] python.pythonVersion}-none-manylinux2010_${stdenv.targetPlatform.linuxArch}.whl";
|
||||
src = "${bazel-build}/jaxlib-${version}-cp${builtins.replaceStrings ["."] [""] python.pythonVersion}-none-${platformTag}.whl";
|
||||
|
||||
# Note that cudatoolkit is necessary since jaxlib looks for "ptxas" in $PATH.
|
||||
# See https://github.com/NixOS/nixpkgs/pull/164176#discussion_r828801621 for
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "peaqevcore";
|
||||
version = "5.2.0";
|
||||
version = "5.4.3";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-8zllJh34tAymjW3OaFNiDuChdk/og09l51OFlt0jNqs=";
|
||||
hash = "sha256-WeAYa1Iggog5VX1oiANZCeVpuEF5JdabdUjQ+fkAwxE=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pymavlink";
|
||||
version = "2.4.31";
|
||||
version = "2.4.34";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-p7cvwMpW1fS9Ml72vsD9L35wqPjtsQHW5lclw5SJ4P0=";
|
||||
sha256 = "sha256-2JPBjEXiJWDJJPwS7SjNr3L4Ct+U44QaJiiv8MtSnEk=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ future lxml ];
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pypoolstation";
|
||||
version = "0.4.8";
|
||||
version = "0.4.9";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -17,7 +17,7 @@ buildPythonPackage rec {
|
||||
src = fetchPypi {
|
||||
pname = "PyPoolstation";
|
||||
inherit version;
|
||||
sha256 = "sha256-6Fdam/LS3Nicrhe5jHHvaKCpE0HigfOVszjb5c1VM3Y=";
|
||||
sha256 = "sha256-2smgsR5f2fzmutr4EjhyrFWrO9odTba0ux+0B6k3+9Y=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -9,14 +9,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pysma";
|
||||
version = "0.6.11";
|
||||
version = "0.6.12";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-x0sFJAdueSny0XoaOYbYLN8ZRS5B/iEVT62mqd4Voe4=";
|
||||
sha256 = "sha256-uxMxqx5qbahMvTm3akiOTODhKLNVhHzBAUsOcZo/35I=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -12,14 +12,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qcengine";
|
||||
version = "0.24.0";
|
||||
version = "0.24.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-T6/gC3HHCnI3O1Gkj/MdistL93bwymtEfNF6PmA7TN0=";
|
||||
hash = "sha256-KUOGbGQd1ffXNkQiW8yeUxValCOAfd8nBv9nnk9giVU=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ lib, buildPythonApplication, fetchFromGitHub, bash, cmake, flex
|
||||
, libclang, llvm, unifdef
|
||||
, chardet, pebble, psutil, pytestCheckHook, pytest-flake8
|
||||
, chardet, pebble, psutil
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
@ -22,7 +22,6 @@ buildPythonApplication rec {
|
||||
nativeBuildInputs = [ cmake flex llvm.dev ];
|
||||
buildInputs = [ bash libclang llvm llvm.dev unifdef ];
|
||||
propagatedBuildInputs = [ chardet pebble psutil ];
|
||||
checkInputs = [ pytestCheckHook pytest-flake8 unifdef ];
|
||||
|
||||
# 'cvise --command=...' generates a script with hardcoded shebang.
|
||||
postPatch = ''
|
||||
@ -30,14 +29,8 @@ buildPythonApplication rec {
|
||||
--replace "#!/bin/bash" "#!${bash}/bin/bash"
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
patchShebangs cvise.py
|
||||
'';
|
||||
disabledTests = [
|
||||
# Needs gcc, fails when run noninteractively (without tty).
|
||||
"test_simple_reduction"
|
||||
];
|
||||
|
||||
# pytest-flake8 is broken in nixpkgs: https://github.com/tholo/pytest-flake8/issues/87
|
||||
doCheck = false;
|
||||
dontUsePipInstall = true;
|
||||
dontUseSetuptoolsBuild = true;
|
||||
dontUseSetuptoolsCheck = true;
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, buildPackages
|
||||
, docbook_xml_dtd_44
|
||||
, docbook_xsl
|
||||
, libcap
|
||||
@ -23,6 +24,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ docbook_xml_dtd_44 docbook_xsl meson ninja pkg-config xmlto ];
|
||||
buildInputs = [ libcap ];
|
||||
|
||||
|
73
pkgs/tools/admin/gam/default.nix
Normal file
73
pkgs/tools/admin/gam/default.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "gam";
|
||||
version = "6.22";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GAM-team";
|
||||
repo = "gam";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-G/S1Rrm+suiy1CTTFLcBGt/QhARL7puHgR65nCxodH0=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/src";
|
||||
|
||||
patches = [
|
||||
# Also disables update check
|
||||
./signal_files_as_env_vars.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
distro
|
||||
filelock
|
||||
google-api-python-client
|
||||
google-auth
|
||||
google-auth-oauthlib
|
||||
passlib
|
||||
pathvalidate
|
||||
python-dateutil
|
||||
setuptools
|
||||
];
|
||||
|
||||
# Use XDG-ish dirs for configuration. These would otherwise be in the gam
|
||||
# package.
|
||||
#
|
||||
# Using --run as `makeWapper` evaluates variables for --set and --set-default
|
||||
# at build time and then single quotes the vars in the wrapper, thus they
|
||||
# wouldn't get expanded. But using --run allows setting default vars that are
|
||||
# evaluated on run and not during build time.
|
||||
makeWrapperArgs = [
|
||||
''--run 'export GAMUSERCONFIGDIR="''${XDG_CONFIG_HOME:-$HOME/.config}/gam"' ''
|
||||
''--run 'export GAMSITECONFIGDIR="''${XDG_CONFIG_HOME:-$HOME/.config}/gam"' ''
|
||||
''--run 'export GAMCACHEDIR="''${XDG_CACHE_HOME:-$HOME/.cache}/gam"' ''
|
||||
''--run 'export GAMDRIVEDIR="$PWD"' ''
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp gam.py $out/bin/gam
|
||||
mkdir -p $out/lib/${python3.libPrefix}/site-packages
|
||||
cp -r gam $out/lib/${python3.libPrefix}/site-packages
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
${python3.interpreter} -m unittest discover --pattern "*_test.py" --buffer
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command line management for Google Workspace";
|
||||
homepage = "https://github.com/GAM-team/GAM/wiki";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ thanegill ];
|
||||
};
|
||||
|
||||
}
|
38
pkgs/tools/admin/gam/signal_files_as_env_vars.patch
Normal file
38
pkgs/tools/admin/gam/signal_files_as_env_vars.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/gam/__init__.py b/gam/__init__.py
|
||||
index 1c187ce..b2de793 100755
|
||||
--- a/gam/__init__.py
|
||||
+++ b/gam/__init__.py
|
||||
@@ -549,22 +549,16 @@ def SetGlobalVariables():
|
||||
_getOldEnvVar(GC_TLS_MIN_VERSION, 'GAM_TLS_MIN_VERSION')
|
||||
_getOldEnvVar(GC_TLS_MAX_VERSION, 'GAM_TLS_MAX_VERSION')
|
||||
_getOldEnvVar(GC_CA_FILE, 'GAM_CA_FILE')
|
||||
- _getOldSignalFile(GC_DEBUG_LEVEL,
|
||||
- 'debug.gam',
|
||||
- filePresentValue=4,
|
||||
- fileAbsentValue=0)
|
||||
- _getOldSignalFile(GC_NO_BROWSER, 'nobrowser.txt')
|
||||
- _getOldSignalFile(GC_NO_TDEMAIL, 'notdemail.txt')
|
||||
- _getOldSignalFile(GC_OAUTH_BROWSER, 'oauthbrowser.txt')
|
||||
+ _getOldEnvVar(GC_DEBUG_LEVEL, 'GAM_DEBUG')
|
||||
+ _getOldEnvVar(GC_NO_BROWSER, 'GAM_NO_BROWSER')
|
||||
+ _getOldEnvVar(GC_NO_TDEMAIL, 'GAM_NO_TDEMAIL')
|
||||
+ _getOldEnvVar(GC_OAUTH_BROWSER, 'GAM_OAUTH_BROWSER')
|
||||
# _getOldSignalFile(GC_NO_CACHE, u'nocache.txt')
|
||||
# _getOldSignalFile(GC_CACHE_DISCOVERY_ONLY, u'allcache.txt', filePresentValue=False, fileAbsentValue=True)
|
||||
- _getOldSignalFile(GC_NO_CACHE,
|
||||
- 'allcache.txt',
|
||||
- filePresentValue=False,
|
||||
- fileAbsentValue=True)
|
||||
- _getOldSignalFile(GC_NO_SHORT_URLS, 'noshorturls.txt')
|
||||
- _getOldSignalFile(GC_NO_UPDATE_CHECK, 'noupdatecheck.txt')
|
||||
- _getOldSignalFile(GC_ENABLE_DASA, FN_ENABLEDASA_TXT)
|
||||
+ _getOldEnvVar(GC_NO_CACHE, 'GAM_NO_CACHE')
|
||||
+ _getOldEnvVar(GC_NO_SHORT_URLS, 'GAM_NO_SHORT_URLS')
|
||||
+ GC_Defaults[GC_NO_UPDATE_CHECK] = True
|
||||
+ _getOldEnvVar(GC_ENABLE_DASA, FN_ENABLEDASA_TXT)
|
||||
# Assign directories first
|
||||
for itemName in GC_VAR_INFO:
|
||||
if GC_VAR_INFO[itemName][GC_VAR_TYPE] == GC_TYPE_DIRECTORY:
|
||||
--
|
||||
2.36.0
|
||||
|
@ -1222,6 +1222,8 @@ with pkgs;
|
||||
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa VideoToolbox;
|
||||
};
|
||||
|
||||
gam = callPackage ../tools/admin/gam { };
|
||||
|
||||
gfshare = callPackage ../tools/security/gfshare { };
|
||||
|
||||
gh-cal = callPackage ../tools/misc/gh-cal {
|
||||
@ -34345,6 +34347,8 @@ with pkgs;
|
||||
|
||||
boogie = dotnetPackages.Boogie;
|
||||
|
||||
cbmc = callPackage ../applications/science/logic/cbmc { };
|
||||
|
||||
cadical = callPackage ../applications/science/logic/cadical {};
|
||||
|
||||
inherit (callPackage ./coq-packages.nix {
|
||||
|
@ -4596,12 +4596,17 @@ in {
|
||||
cudaPackages = pkgs.cudaPackages_11_6;
|
||||
};
|
||||
|
||||
jaxlib-build = callPackage ../development/python-modules/jaxlib {
|
||||
jaxlib-build = callPackage ../development/python-modules/jaxlib rec {
|
||||
inherit (pkgs.darwin) cctools;
|
||||
buildBazelPackage = pkgs.buildBazelPackage.override {
|
||||
stdenv = if stdenv.isDarwin then pkgs.darwin.apple_sdk_11_0.stdenv else stdenv;
|
||||
};
|
||||
# Some platforms don't have `cudaSupport` defined, hence the need for 'or false'.
|
||||
cudaSupport = pkgs.config.cudaSupport or false;
|
||||
# At the time of writing (2022-04-18), `cudaPackages.nccl` is broken, so we
|
||||
# pin to `cudaPackages_11_6` instead.
|
||||
cudaPackages = pkgs.cudaPackages_11_6;
|
||||
IOKit = pkgs.darwin.apple_sdk_11_0.IOKit;
|
||||
};
|
||||
|
||||
jaxlib = self.jaxlib-build;
|
||||
|
Loading…
Reference in New Issue
Block a user