fixing nix build

This commit is contained in:
2025-01-05 17:43:53 +00:00
parent bedf1431fa
commit 86f66b1595
5 changed files with 480 additions and 481 deletions

View File

@@ -1,22 +1,20 @@
{ nixpkgs ? import <nixpkgs> { } }:
{ pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in
import (fetchTree nixpkgs.locked) {
overlays = [
(import "${fetchTree gomod2nix.locked}/overlay.nix")
];
}
)
}:
let
pkgs = [
nixpkgs.go
nixpkgs.tmux
nixpkgs.docker
nixpkgs.vim
];
in
nixpkgs.stdenv.mkDerivation {
name = "env";
buildInputs = pkgs;
pure-eval = true;
shellHook =
''
make
export P2PRC=$PWD
export PATH=$PWD:$PATH
'';
}
pkgs.buildGoApplication {
pname = "P2PRC";
version = "2.0.0";
pwd = ./.;
src = ./.;
modules = ./gomod2nix.toml;
}