initial commit
This commit is contained in:
commit
c032629bae
7 changed files with 4253 additions and 0 deletions
53
flake.nix
Normal file
53
flake.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
description = "ralc, a rust calculator";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
};
|
||||
|
||||
outputs = inputs: let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems);
|
||||
pkgsFor = inputs.nixpkgs.legacyPackages;
|
||||
in {
|
||||
packages = eachSystem (system: {
|
||||
default = inputs.self.packages.${system}.ralc;
|
||||
ralc = pkgsFor.${system}.callPackage ./nix/package.nix {};
|
||||
});
|
||||
|
||||
devShells = eachSystem (system: {
|
||||
default = pkgsFor.${system}.mkShell rec {
|
||||
packages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgsFor.${system})
|
||||
cargo
|
||||
rustc
|
||||
rustfmt
|
||||
bacon
|
||||
;
|
||||
inherit
|
||||
(pkgsFor.${system}.rustPackages)
|
||||
clippy
|
||||
;
|
||||
inherit
|
||||
(pkgsFor.${system})
|
||||
libxkbcommon
|
||||
vulkan-loader
|
||||
wayland
|
||||
;
|
||||
inherit
|
||||
(pkgsFor.${system}.xorg)
|
||||
libX11
|
||||
libXcursor
|
||||
libXrandr
|
||||
libXi
|
||||
libxcb
|
||||
;
|
||||
};
|
||||
shellHook = ''
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${builtins.toString (pkgs.lib.makeLibraryPath packages)}";
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue