mirror of
https://github.com/kaesaecracker/servicepoint-simulator.git
synced 2025-01-18 02:20:14 +01:00
wip nix flake
This commit is contained in:
parent
b3e6ad1fc5
commit
373b823285
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730883749,
|
||||
"narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dba414932936fde69f0606b4f1d87c5bc0003ede",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
41
flake.nix
Normal file
41
flake.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
description = "Flake for servicepoint-simulator";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ self, nixpkgs }:
|
||||
rec {
|
||||
packages.hello = nixpkgs.rustPlatform.buildRustPackage rec {
|
||||
pname = "servicepoint-simulator";
|
||||
version = "0.0.1";
|
||||
|
||||
src = [ ]; # TODO: src, Cargo.toml etc
|
||||
|
||||
buildInputs = [
|
||||
|
||||
];
|
||||
nativeBuildInputs = with nixpkgs.legacyPackages.x86_64-linux; [ pkgconfig ];
|
||||
cargoSha256 = "sha256-0hfmV4mbr3l86m0X7EMYTOu/b+BjueVEbbyQz0KgOFY=";
|
||||
|
||||
meta = with nixpkgs.stdenv.lib; {
|
||||
homepage = "";
|
||||
description = "";
|
||||
#license = licenses.gplv3;
|
||||
};
|
||||
|
||||
legacyPackages = packages;
|
||||
|
||||
defaultPackage = packages.hello;
|
||||
};
|
||||
|
||||
devShells.x86_64-linux.default = import ./shell.nix { pkgs = nixpkgs.legacyPackages.x86_64-linux; };
|
||||
|
||||
formatter = {
|
||||
x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
||||
aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.nixfmt-rfc-style;
|
||||
};
|
||||
};
|
||||
}
|
30
shell.nix
30
shell.nix
|
@ -1,14 +1,40 @@
|
|||
{pkgs ? import <nixpkgs> {}}:
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
}:
|
||||
let
|
||||
rust-toolchain = pkgs.symlinkJoin {
|
||||
name = "rust-toolchain";
|
||||
paths = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
rustPlatform.rustcSrc
|
||||
rustfmt
|
||||
clippy
|
||||
cargo-expand
|
||||
];
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs.buildPackages; [
|
||||
rustc cargo gcc rustfmt clippy
|
||||
rust-toolchain
|
||||
|
||||
pkg-config
|
||||
xe
|
||||
lzma
|
||||
|
||||
# linux x11 / wayland
|
||||
libxkbcommon
|
||||
#xorg.libxkbfile
|
||||
wayland
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (
|
||||
with pkgs;
|
||||
[
|
||||
wayland
|
||||
libxkbcommon
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue