chore: nix fmt
This commit is contained in:
parent
b9108c29b2
commit
1cc53fbfb6
3 changed files with 62 additions and 58 deletions
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs ? import <nixpkgs> { } }:
|
{pkgs ? import <nixpkgs> {}}: let
|
||||||
let manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
|
manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
pkg-config
|
pkg-config
|
||||||
libGLU
|
libGLU
|
||||||
|
@ -8,7 +8,7 @@ let manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
|
||||||
wayland
|
wayland
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
pkgs.rustPlatform.buildRustPackage rec {
|
pkgs.rustPlatform.buildRustPackage {
|
||||||
pname = manifest.name;
|
pname = manifest.name;
|
||||||
version = manifest.version;
|
version = manifest.version;
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
@ -29,4 +29,4 @@ pkgs.rustPlatform.buildRustPackage rec {
|
||||||
patchelf --set-rpath "${pkgs.lib.makeLibraryPath packages}:$old_rpath" target/x86_64-unknown-linux-gnu/release/todoodoo
|
patchelf --set-rpath "${pkgs.lib.makeLibraryPath packages}:$old_rpath" target/x86_64-unknown-linux-gnu/release/todoodoo
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
14
flake.nix
14
flake.nix
|
@ -3,18 +3,20 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs }:
|
outputs = {
|
||||||
let
|
self,
|
||||||
supportedSystems = [ "x86_64-linux" ];
|
nixpkgs,
|
||||||
|
}: let
|
||||||
|
supportedSystems = ["x86_64-linux"];
|
||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
pkgsFor = nixpkgs.legacyPackages;
|
pkgsFor = nixpkgs.legacyPackages;
|
||||||
in {
|
in {
|
||||||
|
formatter = forAllSystems (system: pkgsFor.${system}.alejandra);
|
||||||
packages = forAllSystems (system: {
|
packages = forAllSystems (system: {
|
||||||
default = pkgsFor.${system}.callPackage ./default.nix { };
|
default = pkgsFor.${system}.callPackage ./default.nix {};
|
||||||
});
|
});
|
||||||
devShells = forAllSystems (system: {
|
devShells = forAllSystems (system: {
|
||||||
default = pkgsFor.${system}.callPackage ./shell.nix { };
|
default = pkgsFor.${system}.callPackage ./shell.nix {};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
shell.nix
14
shell.nix
|
@ -1,5 +1,8 @@
|
||||||
{ pkgs ? import <nixpkgs> { }, lib }:
|
{
|
||||||
let packages = with pkgs; [
|
pkgs ? import <nixpkgs> {},
|
||||||
|
lib,
|
||||||
|
}: let
|
||||||
|
packages = with pkgs; [
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
rustfmt
|
rustfmt
|
||||||
clippy
|
clippy
|
||||||
|
@ -16,14 +19,13 @@ let packages = with pkgs; [
|
||||||
wayland
|
wayland
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
# Get dependencies from the main package
|
# Get dependencies from the main package
|
||||||
inputsFrom = [ (pkgs.callPackage ./default.nix { }) ];
|
inputsFrom = [(pkgs.callPackage ./default.nix {})];
|
||||||
nativeBuildInputs = packages;
|
nativeBuildInputs = packages;
|
||||||
buildInputs = packages;
|
buildInputs = packages;
|
||||||
env = {
|
env = {
|
||||||
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
|
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
|
||||||
LD_LIBRARY_PATH = "${lib.makeLibraryPath packages}";
|
LD_LIBRARY_PATH = "${lib.makeLibraryPath packages}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue