nix: initial support

This commit is contained in:
Richard Patel 2023-03-05 17:43:56 +00:00
parent 34c3a854a3
commit c31290d35d
3 changed files with 36 additions and 1 deletions

14
.gitignore vendored
View File

@ -1,4 +1,3 @@
.idea
.env.prototxt
*.log
@ -6,6 +5,7 @@
_bin
/radiance
/cmd/radiance/radiance
/vendor
# Data
*.car
@ -15,3 +15,15 @@ LOCK
CURRENT
MANIFEST-*
OPTIONS-*
# Nix
/result
# Editor junk files
# Please just use a global gitignore conf, I'm tired of this
.idea
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

21
default.nix Normal file
View File

@ -0,0 +1,21 @@
{ pkgs ? import <nixpkgs> { }, lib ? pkgs.lib
, buildGoModule ? pkgs.buildGoModule, }:
buildGoModule rec {
pname = "radiance";
version = "0.0.1";
src = ./.;
vendorHash = "sha256-CdU4ppL5yfkC3uSBSm+lUvJi656qJS2FU/ptXwnVbrA=";
buildInputs = with pkgs; [ rocksdb libpcap ];
subPackages = [ "cmd/radiance" ];
meta = with lib; {
description = "Solana experiments, written in Go";
homepage = "https://github.com/firedancer-io/radiance";
license = licenses.asl20;
platforms = platforms.linux;
};
}

2
shell.nix Normal file
View File

@ -0,0 +1,2 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell { packages = with pkgs; [ go_1_19 rocksdb libpcap ]; }