1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Zynh Ludwig 5fbef7f8bf nix 2024-08-28 15:08:30 -07:00
Zynh Ludwig d2207c7ac9 update rustdeps 2024-08-28 15:05:35 -07:00
4 changed files with 889 additions and 525 deletions

1318
Cargo.lock generated

File diff suppressed because it is too large Load Diff

48
flake.lock Normal file
View File

@ -0,0 +1,48 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1724479785,
"narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1724811750,
"narHash": "sha256-PvhVgQ1rm3gfhK7ts4emprhh/KMkFwXogmgsQ3srR7g=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "6a1c4915dca7149e7258d8c7f3ac634d8c65f6c6",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

36
flake.nix Normal file
View File

@ -0,0 +1,36 @@
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, rust-overlay, ... }:
let
# System types to support.
supportedSystems = [
"x86_64-linux"
];
forAllSystems = function: nixpkgs.lib.genAttrs supportedSystems
(system: function (import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
}));
in
{
devShells = forAllSystems
(pkgs: {
default = import ./shell.nix {
inherit pkgs;
additionalBuildInputs = [
(pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default))
];
};
});
};
}

12
shell.nix Normal file
View File

@ -0,0 +1,12 @@
{ pkgs ? import <nixpkgs> { }, additionalBuildInputs ? [ ] }:
with pkgs;
mkShell rec {
nativeBuildInputs = [
pkg-config
openssl
];
buildInputs = additionalBuildInputs;
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
}