init
This commit is contained in:
parent
f810a0f645
commit
3490cd6ed9
7 changed files with 2799 additions and 0 deletions
47
flake.nix
Normal file
47
flake.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
description = "NextCompanion — a minimal GTK4 Nextbike client for Linux";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, rust-overlay, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
|
||||
runtimeDeps = with pkgs; [
|
||||
gtk4
|
||||
libadwaita
|
||||
glib
|
||||
];
|
||||
buildDeps = with pkgs; [
|
||||
pkg-config
|
||||
rust-bin.stable.latest.default
|
||||
];
|
||||
in
|
||||
{
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = buildDeps ++ runtimeDeps;
|
||||
shellHook = ''
|
||||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath runtimeDeps}:$LD_LIBRARY_PATH"
|
||||
'';
|
||||
};
|
||||
|
||||
packages.${system}.default = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "next-companion";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
nativeBuildInputs = buildDeps;
|
||||
buildInputs = runtimeDeps;
|
||||
};
|
||||
|
||||
apps.${system}.default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.default}/bin/next-companion";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue