Compare commits
35 commits
24b1374875
...
cc2dfc8747
| Author | SHA1 | Date | |
|---|---|---|---|
| cc2dfc8747 | |||
|
|
e6a8a34661 | ||
|
|
b03bbe9f4a | ||
|
|
04a44a1493 | ||
| 82f1a75c98 | |||
| d14037ffd6 | |||
| 0286e0d645 | |||
| 7eb8e54aea | |||
| d6e6711f40 | |||
| 828497661d | |||
| 27e9f00c69 | |||
| 597aa03bdb | |||
| 6cd85782d9 | |||
| e634e6222e | |||
| 3bc72b826a | |||
| b590911ebd | |||
| 7b3f4f072b | |||
| d1be381c60 | |||
| 386e3f23cf | |||
|
|
3c727ec4b4 | ||
| 056fd0c05d | |||
| 289154e2bb | |||
| 98b07bbeed | |||
| 02933bf1d2 | |||
|
|
e887f0e3d4 | ||
|
|
025abd1480 | ||
|
|
c9b5820d80 | ||
|
|
c28b44152f | ||
|
|
f7244c7e45 | ||
|
|
de44a16949 | ||
|
|
da33929aab | ||
|
|
4dc03b821e | ||
|
|
0158ebc202 | ||
|
|
09101274fc | ||
|
|
3eb8b50d88 |
19 changed files with 1140 additions and 17 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*~
|
||||
97
default.nix
97
default.nix
|
|
@ -1,16 +1,111 @@
|
|||
{pkgs,...}:
|
||||
{pkgs, uv2nix ? null, pyproject-nix ? null, pyproject-build-systems ? null, npm-lockfile-fix-pkg ? null, ...}:
|
||||
with pkgs;
|
||||
let
|
||||
cedro = callPackage ./pkgs/c/cedro/package.nix {};
|
||||
capnpc = callPackage ./pkgs/c/capnpc/package.nix {};
|
||||
gost-ctl = callPackage ./pkgs/g/gost-ctl/package.nix {};
|
||||
norouter = callPackage ./pkgs/n/norouter/package.nix {};
|
||||
xbuild = callPackage ./pkgs/x/xbuild/package.nix {
|
||||
pkgs = pkgs;
|
||||
cedro = cedro;
|
||||
capnpc = capnpc;
|
||||
};
|
||||
zlog_with_pkgconf = callPackage ./pkgs/z/zlog/package.nix {
|
||||
with_pkgconf = true;
|
||||
};
|
||||
tinylog = callPackage ./pkgs/t/tinylog/package.nix {};
|
||||
unity_test_with_color = pkgs.unity-test.overrideAttrs {
|
||||
env.NIX_CFLAGS_COMPILE = "-DUNITY_OUTPUT_COLOR=1";
|
||||
};
|
||||
libcello_debug = pkgs.libcello.overrideAttrs (prevAttrs: {
|
||||
separateDebugInfo = true;
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/pkgconfig
|
||||
cat >$out/lib/pkgconfig/libcello.pc <<EOF
|
||||
prefix=$out
|
||||
exec_prefix=\''${prefix}
|
||||
libdir=$out/lib
|
||||
includedir=$out/include
|
||||
|
||||
Name: ${prevAttrs.pname}
|
||||
Version: ${prevAttrs.version}
|
||||
Description: ${prevAttrs.meta.description}
|
||||
Libs: -L\''${libdir} -lCello
|
||||
Cflags: -I\''${includedir}
|
||||
EOF
|
||||
'';
|
||||
});
|
||||
packcc_main = pkgs.packcc.overrideAttrs (prevAttrs: {
|
||||
version = "3.0.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "arithy";
|
||||
repo = "packcc";
|
||||
rev = "main";
|
||||
hash = "sha256-zkrpPGLylgPpV1iyXosVbsbn2qt8/+WnBeK/w1WtwBk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.cmake
|
||||
pkgs.gnumake
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
echo using ${if stdenv.cc.isGNU then
|
||||
"gcc"
|
||||
else if stdenv.cc.isClang then
|
||||
"clang"
|
||||
else
|
||||
throw "Unknown compiler"
|
||||
}
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
cmake $src -DCMAKE_INSTALL_PREFIX=$out
|
||||
cmake --build .
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cmake --install .
|
||||
'';
|
||||
|
||||
});
|
||||
uem = callPackage ./pkgs/u/uem/package.nix {
|
||||
pkgs = pkgs;
|
||||
};
|
||||
claude-gate = callPackage ./pkgs/c/claude-gate/package.nix {
|
||||
pkgs = pkgs;
|
||||
};
|
||||
cetcd = callPackage ./pkgs/c/cetcd/package.nix {};
|
||||
deepseek-tui = callPackage ./pkgs/d/deepseek-tui/package.nix {};
|
||||
kiro-account-manager = callPackage ./pkgs/k/kiro-account-manager/package.nix {};
|
||||
hermes-agent = callPackage ./pkgs/h/hermes-agent/package.nix {
|
||||
uv2nix = uv2nix;
|
||||
pyproject-nix = pyproject-nix;
|
||||
pyproject-build-systems = pyproject-build-systems;
|
||||
npm-lockfile-fix = npm-lockfile-fix-pkg;
|
||||
};
|
||||
struct2json = callPackage ./pkgs/s/struct2json/package.nix {
|
||||
pkgs = pkgs;
|
||||
};
|
||||
my-ttf-fonts = callPackage ./pkgs/f/fonts/package.nix {};
|
||||
in
|
||||
{
|
||||
xbuild = xbuild;
|
||||
capnpc = capnpc;
|
||||
cedro = cedro;
|
||||
gost-ctl = gost-ctl;
|
||||
norouter = norouter;
|
||||
zlog_with_pkgconf = zlog_with_pkgconf;
|
||||
tinylog = tinylog;
|
||||
unity_test_with_color = unity_test_with_color;
|
||||
uem = uem;
|
||||
cetcd = cetcd;
|
||||
deepseek-tui = deepseek-tui;
|
||||
kiro-account-manager = kiro-account-manager;
|
||||
hermes-agent = hermes-agent;
|
||||
libcello_debug = libcello_debug;
|
||||
packcc = packcc_main;
|
||||
struct2json = struct2json;
|
||||
my-ttf-fonts = my-ttf-fonts;
|
||||
claude-gate = claude-gate;
|
||||
}
|
||||
|
|
|
|||
196
flake.lock
generated
196
flake.lock
generated
|
|
@ -1,12 +1,30 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1755615617,
|
||||
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||
"lastModified": 1777954456,
|
||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -16,9 +34,179 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"npm-lockfile-fix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775903712,
|
||||
"narHash": "sha256-2GV79U6iVH4gKAPWYrxUReB0S41ty/Y3dBLquU8AlaA=",
|
||||
"owner": "jeslie0",
|
||||
"repo": "npm-lockfile-fix",
|
||||
"rev": "c6093acb0c0548e0f9b8b3d82918823721930fe8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jeslie0",
|
||||
"repo": "npm-lockfile-fix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pyproject-build-systems": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"pyproject-nix": "pyproject-nix",
|
||||
"uv2nix": "uv2nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1776659114,
|
||||
"narHash": "sha256-qapCOQmR++yZSY43dzrp3wCrkOTLpod+ONtJWBk6iKU=",
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "build-system-pkgs",
|
||||
"rev": "ffaa2161dd5d63e0e94591f86b54fc239660fb2e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "build-system-pkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pyproject-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pyproject-build-systems",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1776317425,
|
||||
"narHash": "sha256-5iPq7MxKwAhKu76uGkRo/7RWfu9GCtsMdeacetTFINI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "pyproject.nix",
|
||||
"rev": "1b0021e93fa281f694510321514731086dbedd13",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "pyproject.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pyproject-nix_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1776715674,
|
||||
"narHash": "sha256-Gs1VnEkCkkRZxJQAC/Dhz0Jbfi22mFXChbtNg9w/Ybg=",
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "pyproject.nix",
|
||||
"rev": "69f57f27e52a87c54e28138a75ec741cd46663c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "pyproject.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pyproject-nix_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"uv2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1776715674,
|
||||
"narHash": "sha256-Gs1VnEkCkkRZxJQAC/Dhz0Jbfi22mFXChbtNg9w/Ybg=",
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "pyproject.nix",
|
||||
"rev": "69f57f27e52a87c54e28138a75ec741cd46663c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "pyproject.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"npm-lockfile-fix": "npm-lockfile-fix",
|
||||
"pyproject-build-systems": "pyproject-build-systems",
|
||||
"pyproject-nix": "pyproject-nix_2",
|
||||
"uv2nix": "uv2nix_2"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"uv2nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pyproject-build-systems",
|
||||
"nixpkgs"
|
||||
],
|
||||
"pyproject-nix": [
|
||||
"pyproject-build-systems",
|
||||
"pyproject-nix"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1776317509,
|
||||
"narHash": "sha256-nSriomT9IJvyVY/mzyFz4Un6DHSjCfrVitcIfV+VHnY=",
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "uv2nix",
|
||||
"rev": "56cfeb9813150e1f900f13e4d6fe46e2845f82d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "uv2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"uv2nix_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"pyproject-nix": "pyproject-nix_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777895960,
|
||||
"narHash": "sha256-KebDsQd+A7pm++Tp0744EjULttHvz1wbKqNKkMA/088=",
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "uv2nix",
|
||||
"rev": "5ad90d48b80ecc920ca2247d53f46beba302e186",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "uv2nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
47
flake.nix
47
flake.nix
|
|
@ -1,21 +1,46 @@
|
|||
{
|
||||
description = "A very basic flake";
|
||||
description = "Flake for some special packages";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
pyproject-nix = {
|
||||
url = "github:pyproject-nix/pyproject.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
uv2nix = {
|
||||
url = "github:pyproject-nix/uv2nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
pyproject-build-systems = {
|
||||
url = "github:pyproject-nix/build-system-pkgs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
npm-lockfile-fix = {
|
||||
url = "github:jeslie0/npm-lockfile-fix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs}:
|
||||
outputs = { self, nixpkgs, flake-utils, uv2nix, pyproject-nix, pyproject-build-systems, npm-lockfile-fix }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
import ./default.nix { inherit pkgs; });
|
||||
};
|
||||
flake-utils.lib.eachSystem supportedSystems (
|
||||
system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
xpkgs = import ./default.nix {
|
||||
inherit pkgs uv2nix pyproject-nix pyproject-build-systems;
|
||||
npm-lockfile-fix-pkg = npm-lockfile-fix.packages.${system}.default;
|
||||
};
|
||||
in rec {
|
||||
packages = xpkgs;
|
||||
defaultPackage = xpkgs.uem;
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = xpkgs.uem.nativeBuildInputs;
|
||||
};
|
||||
|
||||
devShell = self.devShells.${system}.default;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ stdenv.mkDerivation {
|
|||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cmake --preset=ci-linux_x86_64 -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=$out
|
||||
cmake --preset=ci-linux_x86_64 -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$out
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
|
|
|
|||
66
pkgs/c/cetcd/package.nix
Normal file
66
pkgs/c/cetcd/package.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "cetcd";
|
||||
version = "1.0.0";
|
||||
meta = with lib; {
|
||||
description = "c binding of etcd client api";
|
||||
homepage = "https://github.com/shafreeck/cetcd";
|
||||
license = lib.license.apsl20;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = pname;
|
||||
version = version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shen390s";
|
||||
repo = "cetcd";
|
||||
rev = "master";
|
||||
sha256 = "sha256-BTJXrJyjPp5ynHH5Ct91PFiWATzBal4rsnX84wJ0nCg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.gnumake
|
||||
pkgs.curl
|
||||
pkgs.pkg-config
|
||||
pkgs.yajl
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
true
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make prefix=$out
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
make install prefix=$out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/pkgconfig
|
||||
cat >$out/lib/pkgconfig/cetcd.pc <<EOF
|
||||
prefix=$out
|
||||
exec_prefix=\''${prefix}
|
||||
libdir=$out/lib
|
||||
includedir=\''${prefix}/include
|
||||
|
||||
Name: ${pname}
|
||||
Description: ${meta.description}
|
||||
Version: ${version}
|
||||
Libs: -L\''${libdir} -lcetcd
|
||||
Cflags: -I\''${includedir}
|
||||
EOF
|
||||
'';
|
||||
|
||||
}
|
||||
43
pkgs/c/claude-gate/package.nix
Normal file
43
pkgs/c/claude-gate/package.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# claude-gate
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "claude-gate";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shen390s";
|
||||
repo = "claude-gate";
|
||||
rev = "master";
|
||||
sha256 = "sha256-StvSYsWLbGQCXpzlOaXjd7VRn/8l+u3CVIiK1nyVGqU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.go
|
||||
pkgs.gcc
|
||||
pkgs.gnumake
|
||||
];
|
||||
|
||||
env = {
|
||||
GOPROXY = "https://goproxy.cn";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
HOME=$TMPDIR
|
||||
GOCACHE=$TMPDIR/gocache
|
||||
GOPATH=$TMPDIR/go
|
||||
export HOME GOCACHE GOPATH
|
||||
make build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp claude-gate $out/bin
|
||||
'';
|
||||
}
|
||||
34
pkgs/d/deepseek-tui/package.nix
Normal file
34
pkgs/d/deepseek-tui/package.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
dbus,
|
||||
openssl,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "deepseek-tui";
|
||||
version = "0.8.20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shen390s";
|
||||
repo = "DeepSeek-TUI";
|
||||
rev = "f183501fbd2199d9d10040e1a63392de604f172c";
|
||||
hash = "sha256-E621hEtWjdr5c9MZsifaYgdjyFvXcMvKLFmiyC4+Hr8=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-7Atb+VhGHk1RtNJl+7kJOimpc/4sZs/pTKDRWmUzoSI=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ dbus openssl ];
|
||||
|
||||
meta = {
|
||||
description = "A TUI client for DeepSeek AI";
|
||||
homepage = "https://github.com/shen390s/DeepSeek-TUI";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "deepseek";
|
||||
};
|
||||
}
|
||||
61
pkgs/f/fonts/package.nix
Normal file
61
pkgs/f/fonts/package.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
# fetchFromGitea,
|
||||
# fetchFromGitHub,
|
||||
# fetchgit,
|
||||
pkgs? import <nixpkgs> {},
|
||||
pkg-config,
|
||||
}:
|
||||
|
||||
let
|
||||
meta = with lib; {
|
||||
description = "Some true type fonts";
|
||||
homepage = "https://github.com/shen390s/my-ttf-fonts";
|
||||
license = lib.licenses.asl20;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
pname = "my-ttf-fonts";
|
||||
version = "1.0";
|
||||
mysource = pkgs.runCommand "download-fonts" {
|
||||
nativeBuiltInputs = [ pkgs.curl ];
|
||||
outputHash = "sha256-JMWxG0lCkzXhuBoBtEk8N0g6qrLRJo0WGki9A+yTbhU=";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "flat";
|
||||
} ''
|
||||
${pkgs.curl}/bin/curl --output $out \
|
||||
--location \
|
||||
--max-redirs 20 \
|
||||
--retry 3 \
|
||||
--disable-epsv \
|
||||
--cookie-jar cookies \
|
||||
--insecure \
|
||||
--user-agent curl/8.17.0 -C - --fail \
|
||||
https://gitee.com/shen390s/my-ttf-fonts/archive/refs/tags/v1.0.tar.gz
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = pname;
|
||||
version = version;
|
||||
|
||||
src = mysource;
|
||||
|
||||
unpackPhase = ''
|
||||
tar -zxvf $src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts/truetype
|
||||
_fontdir="${pname}-v${version}"
|
||||
if [ -d $_fontdir/fonts/truetype ]; then
|
||||
ls $_fontdir/fonts/truetype/*
|
||||
cp -r $_fontdir/fonts/truetype/*.ttf $out/share/fonts/truetype/
|
||||
cp -r $_fontdir/fonts/truetype/*.ttc $out/share/fonts/truetype/
|
||||
else
|
||||
echo "No fonts found in $_fontdir/fonts/truetype"
|
||||
exit 0
|
||||
fi
|
||||
'';
|
||||
|
||||
inherit meta;
|
||||
})
|
||||
174
pkgs/g/gost-ctl/gost-ctl
Executable file
174
pkgs/g/gost-ctl/gost-ctl
Executable file
|
|
@ -0,0 +1,174 @@
|
|||
#!/bin/bash
|
||||
# gost-ctl — manage the GOST proxy tunnel and container network attachments
|
||||
#
|
||||
# Usage: gost-ctl <command> [args]
|
||||
#
|
||||
# Commands:
|
||||
# start Start gost-tunnel service and watcher
|
||||
# stop Stop gost-tunnel service and watcher
|
||||
# restart Restart gost-tunnel service
|
||||
# attach <name> <ip> Attach a container to the bridge (idempotent)
|
||||
# detach <name> Detach a container from the bridge
|
||||
# status Show tunnel, bridge, and container status
|
||||
#
|
||||
# Config resolution (first match wins):
|
||||
# $GOST_TUNNEL_CONFIG env var → /etc/gost-tunnel/env → .env in script dir
|
||||
|
||||
set -e
|
||||
|
||||
# ─── Config ─────────────────────────────────────────────────────────────────
|
||||
|
||||
CONFIG_FILE="${GOST_TUNNEL_CONFIG:-/etc/gost-tunnel/env}"
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
CONFIG_FILE="$(dirname "$(realpath "$0")")/.env"
|
||||
fi
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
echo "ERROR: config not found. Set GOST_TUNNEL_CONFIG or place .env next to gost-ctl"
|
||||
exit 1
|
||||
fi
|
||||
# shellcheck source=/dev/null
|
||||
source "$CONFIG_FILE"
|
||||
|
||||
# ─── Helpers ────────────────────────────────────────────────────────────────
|
||||
|
||||
log() { echo "[$(date '+%H:%M:%S')] $*"; }
|
||||
|
||||
require_root() {
|
||||
[ "$(id -u)" -eq 0 ] || { echo "ERROR: gost-ctl must be run as root"; exit 1; }
|
||||
}
|
||||
|
||||
# ─── Commands ───────────────────────────────────────────────────────────────
|
||||
|
||||
cmd_start() {
|
||||
systemctl start gost-tunnel gost-tunnel-watcher
|
||||
log "gost-tunnel started"
|
||||
}
|
||||
|
||||
cmd_stop() {
|
||||
systemctl stop gost-tunnel-watcher gost-tunnel
|
||||
log "gost-tunnel stopped"
|
||||
}
|
||||
|
||||
cmd_restart() {
|
||||
systemctl restart gost-tunnel
|
||||
log "gost-tunnel restarted"
|
||||
}
|
||||
|
||||
cmd_attach() {
|
||||
require_root
|
||||
local cname="$1" cip="$2"
|
||||
[ -n "$cname" ] && [ -n "$cip" ] \
|
||||
|| { echo "Usage: gost-ctl attach <name> <ip>"; exit 1; }
|
||||
|
||||
local veth_h="veth-${cname}-h" veth_c="veth-${cname}-c"
|
||||
|
||||
# Idempotency: skip if already attached
|
||||
if ip link show "$veth_h" >/dev/null 2>&1; then
|
||||
log "$cname already attached (veth exists), skipping."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Wait for container PID
|
||||
local pid
|
||||
for i in $(seq 1 30); do
|
||||
pid=$(docker inspect -f '{{.State.Pid}}' "$cname" 2>/dev/null)
|
||||
[[ "$pid" =~ ^[0-9]+$ ]] && [ "$pid" -gt 0 ] && break
|
||||
log "Waiting for $cname PID... ($i/30)"; sleep 1
|
||||
done
|
||||
[[ "$pid" =~ ^[0-9]+$ ]] && [ "$pid" -gt 0 ] \
|
||||
|| { log "ERROR: $cname PID not found"; docker logs "$cname"; exit 1; }
|
||||
|
||||
log "$cname PID: $pid"
|
||||
mkdir -p /var/run/netns
|
||||
ln -sfT "/proc/$pid/ns/net" "/var/run/netns/$cname"
|
||||
|
||||
ip link add "$veth_h" type veth peer name "$veth_c"
|
||||
ip link set "$veth_h" master "$BRIDGE_NAME"
|
||||
ip link set "$veth_h" up
|
||||
ip link set "$veth_c" netns "$cname"
|
||||
ip netns exec "$cname" ip link set "$veth_c" name eth0
|
||||
ip netns exec "$cname" ip link set lo up
|
||||
ip netns exec "$cname" ip link set eth0 up
|
||||
ip netns exec "$cname" ip addr add "${cip}/24" dev eth0
|
||||
ip netns exec "$cname" ip route add default via "$BRIDGE_IP"
|
||||
log "$cname attached at $cip via $BRIDGE_IP"
|
||||
}
|
||||
|
||||
cmd_detach() {
|
||||
require_root
|
||||
local cname="$1"
|
||||
[ -n "$cname" ] || { echo "Usage: gost-ctl detach <name>"; exit 1; }
|
||||
|
||||
local veth_h="veth-${cname}-h"
|
||||
if ip link del "$veth_h" 2>/dev/null; then
|
||||
log "$cname veth removed"
|
||||
else
|
||||
log "$cname veth not found (already detached?)"
|
||||
fi
|
||||
rm -f "/var/run/netns/$cname"
|
||||
log "$cname detached"
|
||||
}
|
||||
|
||||
cmd_status() {
|
||||
echo ""
|
||||
local svc_state watcher_state
|
||||
svc_state=$(systemctl is-active gost-tunnel 2>/dev/null || echo "inactive")
|
||||
watcher_state=$(systemctl is-active gost-tunnel-watcher 2>/dev/null || echo "inactive")
|
||||
echo "Service: $svc_state"
|
||||
echo "Watcher: $watcher_state"
|
||||
|
||||
if ip link show "$TUN_NAME" >/dev/null 2>&1; then
|
||||
local tun_addr
|
||||
tun_addr=$(ip -4 addr show "$TUN_NAME" | awk '/inet /{print $2}' | head -1)
|
||||
echo "TUN: $TUN_NAME UP ${tun_addr:-<no addr>}"
|
||||
else
|
||||
echo "TUN: $TUN_NAME DOWN"
|
||||
fi
|
||||
|
||||
if ip link show "$BRIDGE_NAME" >/dev/null 2>&1; then
|
||||
local br_addr
|
||||
br_addr=$(ip -4 addr show "$BRIDGE_NAME" | awk '/inet /{print $2}' | head -1)
|
||||
echo "Bridge: $BRIDGE_NAME UP ${br_addr:-<no addr>}"
|
||||
else
|
||||
echo "Bridge: $BRIDGE_NAME DOWN"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Attached containers:"
|
||||
local found=0
|
||||
for veth in $(ip link show 2>/dev/null | grep -oP 'veth-\S+-h' | sort -u); do
|
||||
local cname="${veth#veth-}"; cname="${cname%-h}"
|
||||
local cip
|
||||
cip=$(ip netns exec "$cname" ip -4 addr show eth0 2>/dev/null \
|
||||
| awk '/inet /{print $2}' | head -1 || echo "<unknown>")
|
||||
local link_state
|
||||
link_state=$(ip link show "$veth" 2>/dev/null | grep -oP '(?<=state )\S+' | head -1)
|
||||
printf " %-16s %-18s %s\n" "$cname" "$cip" "$veth ${link_state:-?}"
|
||||
found=1
|
||||
done
|
||||
[ "$found" -eq 0 ] && echo " (none)"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# ─── Dispatch ───────────────────────────────────────────────────────────────
|
||||
|
||||
case "${1:-}" in
|
||||
start) cmd_start ;;
|
||||
stop) cmd_stop ;;
|
||||
restart) cmd_restart ;;
|
||||
attach) shift; cmd_attach "$@" ;;
|
||||
detach) shift; cmd_detach "$@" ;;
|
||||
status) cmd_status ;;
|
||||
*)
|
||||
echo "Usage: gost-ctl <command> [args]"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " start Start gost-tunnel service and watcher"
|
||||
echo " stop Stop gost-tunnel service and watcher"
|
||||
echo " restart Restart gost-tunnel service"
|
||||
echo " attach <name> <ip> Attach container to bridge"
|
||||
echo " detach <name> Detach container from bridge"
|
||||
echo " status Show tunnel and container status"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
28
pkgs/g/gost-ctl/package.nix
Normal file
28
pkgs/g/gost-ctl/package.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# xbuild.nix
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
gost-ctl=stdenv.mkDerivation {
|
||||
pname = "gost-ctl";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.gost
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp gost-ctl $out/bin
|
||||
chmod +x $out/bin/gost-ctl
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
gost-ctl
|
||||
54
pkgs/h/hermes-agent/package.nix
Normal file
54
pkgs/h/hermes-agent/package.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
makeWrapper,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
python312,
|
||||
nodejs_22,
|
||||
ripgrep,
|
||||
git,
|
||||
openssh,
|
||||
ffmpeg,
|
||||
uv2nix,
|
||||
pyproject-nix,
|
||||
pyproject-build-systems,
|
||||
npm-lockfile-fix,
|
||||
}:
|
||||
let
|
||||
rev = "96dc2726232fc02c836b29968550d7dc5af03e36";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NousResearch";
|
||||
repo = "hermes-agent";
|
||||
inherit rev;
|
||||
hash = "sha256-pyqKp9gQLhHz0F8Gsw482CB6M8lRF5mW+Jvxj8sYP7k=";
|
||||
};
|
||||
|
||||
# tirith is an optional security scanner that auto-downloads itself at runtime
|
||||
# if not found on PATH; provide a stub so the nix package builds cleanly.
|
||||
tirith = stdenv.mkDerivation {
|
||||
pname = "tirith-stub";
|
||||
version = "0";
|
||||
dontUnpack = true;
|
||||
installPhase = "mkdir -p $out/bin";
|
||||
};
|
||||
in
|
||||
callPackage "${src}/nix/hermes-agent.nix" {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
makeWrapper
|
||||
python312
|
||||
nodejs_22
|
||||
ripgrep
|
||||
git
|
||||
openssh
|
||||
ffmpeg
|
||||
tirith
|
||||
uv2nix
|
||||
pyproject-nix
|
||||
pyproject-build-systems
|
||||
npm-lockfile-fix
|
||||
;
|
||||
}
|
||||
72
pkgs/k/kiro-account-manager/package.nix
Normal file
72
pkgs/k/kiro-account-manager/package.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, buildNpmPackage
|
||||
, pkg-config
|
||||
, openssl
|
||||
, glib
|
||||
, gtk3
|
||||
, libsoup_3
|
||||
, webkitgtk_4_1
|
||||
, dbus
|
||||
, libayatana-appindicator
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "kiro-account-manager";
|
||||
version = "1.8.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hj01857655";
|
||||
repo = "kiro-account-manager";
|
||||
rev = "2e2d4b09d3ad3b028dab719958707d9e19923261";
|
||||
hash = "sha256-d1TOjpzVNM+qKW12Ny6FeVfxdipY0ZUbs6Xg9TKeinI=";
|
||||
};
|
||||
|
||||
frontend = buildNpmPackage {
|
||||
pname = "${pname}-frontend";
|
||||
inherit version src;
|
||||
|
||||
npmDepsHash = "sha256-BI0lxemB7qcu1o7bp6kOZrl1/YTVPa8jNUFpZIMZB1I=";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
cp -r dist $out
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
in rustPlatform.buildRustPackage {
|
||||
inherit pname version src;
|
||||
|
||||
sourceRoot = "${src.name}/src-tauri";
|
||||
|
||||
cargoHash = "sha256-GXoNqhwvK9A5zPt0Wb8+hJA+N1nm2DvOb2FfaurLq2Q=";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tauri.conf.json \
|
||||
--replace-fail '"frontendDist": "../dist"' '"frontendDist": "${frontend}"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
glib
|
||||
gtk3
|
||||
dbus
|
||||
libsoup_3
|
||||
webkitgtk_4_1
|
||||
libayatana-appindicator
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Kiro IDE account manager with multi-account switching and quota monitoring";
|
||||
homepage = "https://github.com/hj01857655/kiro-account-manager";
|
||||
license = lib.licenses.cc-by-nc-sa-40;
|
||||
mainProgram = "kiro-account-manager";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
25
pkgs/n/norouter/package.nix
Normal file
25
pkgs/n/norouter/package.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ stdenvNoCC, lib, fetchurl, autoPatchelfHook, zlib, openssl }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "norouter";
|
||||
version = "0.6.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-Linux-x86_64.tgz";
|
||||
hash = "sha256-kNAzGBuYLLHITGJAerH27kj8MjmxjII63ORym//rJEk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
buildInputs = [ zlib openssl ]; # Add required libraries
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
configurePhase = ''
|
||||
cat $src |gzip -dc |tar xf -
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp norouter $out/bin
|
||||
'';
|
||||
}
|
||||
37
pkgs/s/struct2json/package.nix
Normal file
37
pkgs/s/struct2json/package.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkgs,
|
||||
}:
|
||||
|
||||
let
|
||||
meta = with lib; {
|
||||
description = "convert c struct to json";
|
||||
homepage = "https://github.com/armink/struct2json";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
pname = "struct2json";
|
||||
version = "1.0.0";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = pname;
|
||||
version = version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shen390s";
|
||||
repo = "struct2json";
|
||||
rev = "master";
|
||||
hash = "sha256-ZCJC6NmdL4EASlJYlWym3rjPK6qaKGtZMQhY0GIqTTU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.meson
|
||||
pkgs.ninja
|
||||
pkgs.pkgconf
|
||||
];
|
||||
|
||||
inherit meta;
|
||||
})
|
||||
51
pkgs/t/tinylog/package.nix
Normal file
51
pkgs/t/tinylog/package.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
with_pkgconf? false,
|
||||
}:
|
||||
|
||||
let
|
||||
meta = with lib; {
|
||||
description = "Tinylog is a lightweight C-language high performance log component for UNIX environment, It is high performance, asynchronized, thread-safe and process-safe log library for C/C++.";
|
||||
homepage = "https://github.com/pymumu/tinylog";
|
||||
license = lib.licenses.mit;
|
||||
# maintainers = with lib.maintainers; [ matthiasbeyer ];
|
||||
# mainProgram = "zlog-chk-conf";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
pname = "tlog";
|
||||
version = "1.0.0";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = pname;
|
||||
version = version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shen390s";
|
||||
repo = "tinylog";
|
||||
rev = "master";
|
||||
hash = "sha256-ZPyzHe8kRSg1Z3MWtsYeIy4ifziWfYf+lnByrTAgqr4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/pkgconfig
|
||||
cat >$out/lib/pkgconfig/tinylog.pc <<EOF
|
||||
prefix=$out
|
||||
exec_prefix=\''${prefix}
|
||||
libdir=$out/lib
|
||||
includedir=\''${prefix}/include
|
||||
|
||||
Name: ${pname}
|
||||
Description: ${meta.description}
|
||||
Version: ${version}
|
||||
Libs: -L\''${libdir} -ltlog
|
||||
Cflags: -I\''${includedir}
|
||||
EOF
|
||||
'';
|
||||
|
||||
inherit meta;
|
||||
})
|
||||
67
pkgs/u/uem/package.nix
Normal file
67
pkgs/u/uem/package.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkgs,
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "uem";
|
||||
version = "0.1";
|
||||
meta = {
|
||||
description = "Universal Emacs Manager";
|
||||
homepage = "https://github.com/shen390s/uem";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = [ lib.maintainers.i01011001 ];
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = pname;
|
||||
version = version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shen390s";
|
||||
repo = "uem";
|
||||
rev = "develop";
|
||||
# hash ="sha256-v6vtPUVfQ+W4/sZKPxKyuqAGaXda47FZEM4/XdXR63o=";
|
||||
hash = "sha256-c8BqYIfDHica6AhJsWEQY0mMEo5Oj3/VuLKx1s1kO9w=";
|
||||
};
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
roswell
|
||||
patchelf
|
||||
sbcl
|
||||
zstd
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with pkgs; [
|
||||
zstd
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
dontStrip = true;
|
||||
|
||||
configurePhase = ''
|
||||
export ROSWELL_HOME=$PWD/.roswell
|
||||
export HOME=$TMP
|
||||
ros setup
|
||||
ros use sbcl-bin/system
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
set -e
|
||||
cat >$ROSWELL_HOME/init.lisp <<EOF
|
||||
(ros:ensure-asdf)
|
||||
(push (uiop:ensure-directory-pathname "$src/") asdf:*central-registry*)
|
||||
EOF
|
||||
cp -Rf $src/roswell .
|
||||
ros build roswell/uem.ros
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp roswell/uem $out/bin
|
||||
cp -Rf $src/modules $out
|
||||
'';
|
||||
})
|
||||
51
pkgs/u/unity-test/package.nix
Normal file
51
pkgs/u/unity-test/package.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "unity-test";
|
||||
version = "2.6.1";
|
||||
meta = {
|
||||
description = "Unity Unit Testing Framework";
|
||||
homepage = "https://www.throwtheswitch.org/unity";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.i01011001 ];
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = pname;
|
||||
version = version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ThrowTheSwitch";
|
||||
repo = "Unity";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-g0ubq7RxGQmL1R6vz9RIGJpVWYsgrZhsTWSrL1ySEug=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
# makeFlags = [ "UNITY_OUTPUT_COLOR=1" ];
|
||||
env.NIX_CFLAGS_COMPILE = "-DUNITY_OUTPUT_COLOR=1";
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/pkgconfig
|
||||
cat >$out/lib/pkgconfig/unity.pc <<EOF
|
||||
prefix=$out
|
||||
exec_prefix=\''${prefix}
|
||||
libdir=$out/lib
|
||||
includedir=\''${prefix}/include
|
||||
|
||||
Name: ${pname}
|
||||
Description: ${meta.description}
|
||||
Version: ${version}
|
||||
Libs: -L\''${libdir} -lunity
|
||||
Cflags: -I\''${includedir}
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
||||
})
|
||||
51
pkgs/z/zlog/package.nix
Normal file
51
pkgs/z/zlog/package.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
with_pkgconf? false,
|
||||
}:
|
||||
|
||||
let
|
||||
meta = with lib; {
|
||||
description = "Reliable, high-performance, thread safe, flexible, clear-model, pure C logging library";
|
||||
homepage = "https://hardysimpson.github.io/zlog/";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ matthiasbeyer ];
|
||||
mainProgram = "zlog-chk-conf";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
pname = "zlog";
|
||||
version = "1.2.18";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = pname;
|
||||
version = version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "HardySimpson";
|
||||
repo = "zlog";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-79yyOGKgqUR1KI2+ngZd7jfVcz4Dw1IxaYfBJyjsxYc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/pkgconfig
|
||||
cat >$out/lib/pkgconfig/zlog.pc <<EOF
|
||||
prefix=$out
|
||||
exec_prefix=\''${prefix}
|
||||
libdir=$out/lib
|
||||
includedir=\''${prefix}/include
|
||||
|
||||
Name: ${pname}
|
||||
Description: ${meta.description}
|
||||
Version: ${version}
|
||||
Libs: -L\''${libdir} -lzlog
|
||||
Cflags: -I\''${includedir}
|
||||
EOF
|
||||
'';
|
||||
|
||||
inherit meta;
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue