pkgs/netns-proxy: init

This commit is contained in:
Lu Wang 2024-12-05 14:26:37 +08:00
parent ac017d9cf9
commit 585fb9749f
Signed by: rebmit
SSH key fingerprint: SHA256:3px8QV1zEerIrEWHaqtH5rR9kjetyRST5EipOPrd+bU
4 changed files with 53 additions and 0 deletions

18
flake/outputs/nixpkgs.nix Normal file
View file

@ -0,0 +1,18 @@
{ self, ... }:
let
overlays = [
self.overlays.default
];
in
{
perSystem =
{ ... }:
{
nixpkgs = {
config = {
allowUnfree = true;
};
inherit overlays;
};
};
}

View file

@ -0,0 +1,11 @@
{ ... }:
{
flake.overlays = {
default =
_final: prev:
prev.lib.packagesFromDirectoryRecursive {
inherit (prev) callPackage;
directory = ../../pkgs;
};
};
}

View file

@ -0,0 +1,7 @@
{
perSystem =
{ pkgs, ... }:
{
legacyPackages = pkgs;
};
}

View file

@ -0,0 +1,17 @@
{ rustPlatform, fetchFromGitHub, ... }:
rustPlatform.buildRustPackage rec {
name = "netns-proxy";
src = fetchFromGitHub {
owner = "fooker";
repo = "netns-proxy";
rev = "6d9ccbfde4375cd614735ea5f6ee5aba2b6cfd2b";
fetchSubmodules = false;
sha256 = "sha256-N+my6cTuA7yNoYxocpRiLNcy7OwrJLvO2cGLJGv8a/I=";
};
cargoLock = {
lockFile = src + /Cargo.lock;
};
}