fixing nix env

This commit is contained in:
2025-05-20 23:51:33 +01:00
parent 7c34c5385a
commit 42cf9bd028
4 changed files with 117 additions and 125 deletions

View File

@@ -1,13 +1,25 @@
{
description = "P2PRC nix flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.gomod2nix.url = "github:nix-community/gomod2nix";
inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.gomod2nix.inputs.flake-utils.follows = "flake-utils";
inputs = {
outputs = { self, nixpkgs, flake-utils, gomod2nix }:
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
gomod2nix = {
url = "github:nix-community/gomod2nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
p2prc-hs = {
url = "path:./Bindings/Haskell";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs = { self, nixpkgs, flake-utils, gomod2nix, p2prc-hs, ... }:
(flake-utils.lib.eachDefaultSystem
(system:
let
@@ -16,7 +28,10 @@
overlays = [ gomod2nix.overlays.default ];
};
# pkgs = nixpkgs.legacyPackages.${system};
# p2prc-hs = import (self + "/Bindings/Haskell/flake.nix") {
# inherit pkgs;
# inherit system;
# };
# The current default sdk for macOS fails to compile go projects, so we use a newer one for now.
# This has no effect on other platforms.
@@ -26,6 +41,8 @@
packages.default = callPackage ./. { };
# packages.p2prc-hs = p2prc-hs.packages.${system}.default;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
go
@@ -34,6 +51,7 @@
go-tools
gomod2nix.packages.${system}.default
sqlite-interactive
p2prc-hs.devShells.${system}.default
];
};
})