mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-11 17:29:30 +08:00
packages.pybinding: init
This commit is contained in:
19
flake.lock
generated
19
flake.lock
generated
@@ -1282,6 +1282,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pybinding": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1598796477,
|
||||
"narHash": "sha256-4DtGtQ40TEaM6qSydwsj9gD3JqpaCFpcvWJISwn69Zk=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "ec1128aaa84a1b43a74fb970479ce4544bd63179",
|
||||
"revCount": 774,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/dean0x7d/pybinding"
|
||||
},
|
||||
"original": {
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/dean0x7d/pybinding"
|
||||
}
|
||||
},
|
||||
"quickshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -1345,6 +1363,7 @@
|
||||
"plasma-manager": "plasma-manager",
|
||||
"pocketfft": "pocketfft",
|
||||
"py4vasp": "py4vasp",
|
||||
"pybinding": "pybinding",
|
||||
"rsshub": "rsshub",
|
||||
"rycee": "rycee",
|
||||
"sops-nix": "sops-nix",
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
phono3py = { url = "github:phonopy/phono3py/v3.15.1"; flake = false; };
|
||||
sticker = { url = "git+https://git.chn.moe/chn/sticker.git?lfs=1"; flake = false; };
|
||||
speedtest = { url = "github:librespeed/speedtest"; flake = false; };
|
||||
pybinding = { url = "git+https://github.com/dean0x7d/pybinding?submodules=1"; flake = false; };
|
||||
};
|
||||
|
||||
outputs = inputs: let localLib = import ./flake/lib inputs.nixpkgs.lib; in
|
||||
|
||||
@@ -141,6 +141,11 @@ inputs: rec
|
||||
atat = inputs.pkgs.callPackage ./atat.nix { src = inputs.topInputs.self.src.atat; };
|
||||
atomkit = inputs.pkgs.callPackage ./atomkit.nix { src = inputs.topInputs.self.src.atomkit; };
|
||||
xinli = inputs.pkgs.callPackage ./xinli { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
|
||||
pybinding = inputs.pkgs.pkgs-2411.python310Packages.callPackage ./pybinding
|
||||
{
|
||||
src = inputs.topInputs.pybinding;
|
||||
buildProxy = inputs.pkgs.lib.mkBuildproxy ./pybinding/proxy.nix;
|
||||
};
|
||||
|
||||
fromYaml = content: builtins.fromJSON (builtins.readFile
|
||||
(inputs.pkgs.runCommand "toJSON" {}
|
||||
|
||||
12
packages/pybinding/default.nix
Normal file
12
packages/pybinding/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ src, buildPythonPackage, setuptools, cmake, buildProxy, distutils, numpy, scipy, matplotlib, pytest }:
|
||||
buildPythonPackage
|
||||
{
|
||||
name = "pybinding";
|
||||
inherit src;
|
||||
pyproject = true;
|
||||
build-system = [ setuptools cmake distutils ];
|
||||
dependencies = [ numpy scipy matplotlib pytest ];
|
||||
dontUseCmakeConfigure = true;
|
||||
preBuild = ''source ${buildProxy}'';
|
||||
patches = [ ./fix.patch ];
|
||||
}
|
||||
24
packages/pybinding/fix.patch
Normal file
24
packages/pybinding/fix.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff --git a/cppcore/include/numeric/arrayref.hpp b/cppcore/include/numeric/arrayref.hpp
|
||||
index e1ef1ba..722ebdc 100644
|
||||
--- a/cppcore/include/numeric/arrayref.hpp
|
||||
+++ b/cppcore/include/numeric/arrayref.hpp
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <numeric>
|
||||
#include <stdexcept>
|
||||
#include <array>
|
||||
+#include <cstdint>
|
||||
|
||||
namespace cpb { namespace num {
|
||||
|
||||
diff --git a/cppmodule/deps/pybind11/include/pybind11/attr.h b/cppmodule/deps/pybind11/include/pybind11/attr.h
|
||||
index 6962d6fc..f8261bc3 100644
|
||||
--- a/cppmodule/deps/pybind11/include/pybind11/attr.h
|
||||
+++ b/cppmodule/deps/pybind11/include/pybind11/attr.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "cast.h"
|
||||
+#include <cstdint>
|
||||
|
||||
NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
|
||||
|
||||
130
packages/pybinding/proxy.nix
Normal file
130
packages/pybinding/proxy.nix
Normal file
@@ -0,0 +1,130 @@
|
||||
{ fetchurl }:
|
||||
[
|
||||
{
|
||||
url = "https://gitlab.com/libeigen/eigen/-/archive/3.3.3/eigen-3.3.3.tar.gz";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://gitlab.com/libeigen/eigen/-/archive/3.3.3/eigen-3.3.3.tar.gz";
|
||||
hash = "sha256-/XJpQ5C9joFYYgVxfSz4I+cY9YS3eaFV23R9HmhIGi4=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-type" = "application/octet-stream";
|
||||
"content-disposition" = "attachment; filename=eigen-3.3.3.tar.gz";
|
||||
};
|
||||
}
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/mapbox/variant/v1.1.4/include/mapbox/variant.hpp";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/mapbox/variant/v1.1.4/include/mapbox/variant.hpp";
|
||||
hash = "sha256-TsAoFQ3nrnXwS8cxg2RLiu6U7CxZGYHmIm7mHemTgSA=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-type" = "text/plain; charset=utf-8";
|
||||
"content-length" = "31575";
|
||||
};
|
||||
}
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/mapbox/variant/v1.1.4/include/mapbox/recursive_wrapper.hpp";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/mapbox/variant/v1.1.4/include/mapbox/recursive_wrapper.hpp";
|
||||
hash = "sha256-Su1xw27Ctf7TM8isDU8SGXiKg9rM9LvxEh8bUiaGnR0=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-type" = "text/plain; charset=utf-8";
|
||||
"content-length" = "2632";
|
||||
};
|
||||
}
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/mapbox/variant/v1.1.4/include/mapbox/variant_visitor.hpp";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/mapbox/variant/v1.1.4/include/mapbox/variant_visitor.hpp";
|
||||
hash = "sha256-JiPsMvUm0V8P/cXxM3BMHrCAk+cU2JGzWAoK5T2e9DI=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-type" = "text/plain; charset=utf-8";
|
||||
"content-length" = "743";
|
||||
};
|
||||
}
|
||||
{
|
||||
url = "https://github.com/p12tic/libsimdpp/archive//v2.0-rc2.tar.gz";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://github.com/p12tic/libsimdpp/archive//v2.0-rc2.tar.gz";
|
||||
hash = "sha256-dLYHn29FfiMm8HGclKiB/XN4Xu71mpKGjGmTWcuXndg=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-disposition" = "attachment; filename=libsimdpp-2.0-rc2.tar.gz";
|
||||
"content-type" = "application/x-gzip";
|
||||
"content-length" = "287439";
|
||||
};
|
||||
}
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/fmtlib/fmt/3.0.2/fmt/format.h";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/fmtlib/fmt/3.0.2/fmt/format.h";
|
||||
hash = "sha256-7v0pfyt2c2KDtMhot68W9nt13pN+j2OswuuKeB/ZnBs=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-type" = "text/plain; charset=utf-8";
|
||||
"content-length" = "119800";
|
||||
};
|
||||
}
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/fmtlib/fmt/3.0.2/fmt/format.cc";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/fmtlib/fmt/3.0.2/fmt/format.cc";
|
||||
hash = "sha256-cwjmLJljDJ/iQbF5dD6PHnvUSGYfx1Elfq1kebFVzE0=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-type" = "text/plain; charset=utf-8";
|
||||
"content-length" = "28777";
|
||||
};
|
||||
}
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/fmtlib/fmt/3.0.2/fmt/ostream.h";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/fmtlib/fmt/3.0.2/fmt/ostream.h";
|
||||
hash = "sha256-is8VgEdM7FovPR6X3MuRGoPfd+Gm7vtHT+3r6rZasII=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-type" = "text/plain; charset=utf-8";
|
||||
"content-length" = "2830";
|
||||
};
|
||||
}
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/fmtlib/fmt/3.0.2/fmt/ostream.cc";
|
||||
file = fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/fmtlib/fmt/3.0.2/fmt/ostream.cc";
|
||||
hash = "sha256-NKg67BJHmwd5YAIkOqjNEDjvqSspLFHN2+23W5XImSQ=";
|
||||
};
|
||||
status_code = 200;
|
||||
headers =
|
||||
{
|
||||
"content-type" = "text/plain; charset=utf-8";
|
||||
"content-length" = "1073";
|
||||
};
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user