Fix/devshell (#390)

* Fix flake-info attribute name in devShell definition

* Export rust stdlib path though shell hook

* Format flake.nix
This commit is contained in:
Yannik Sander 2021-12-15 02:38:06 +01:00 committed by GitHub
parent fa5fe2a61c
commit 29651d086b
Failed to generate hash of commit

View file

@ -13,10 +13,10 @@
let
pkgs = import nixpkgs {
inherit system;
overlays = [];
overlays = [ ];
};
in
import path { inherit pkgs; };
import path { inherit pkgs; };
packages = system:
{
flake-info = mkPackage ./flake-info system;
@ -24,18 +24,21 @@
};
devShell = system:
let packages_inst = (packages system);
let
packages_inst = (packages system);
pkgs = nixpkgs.legacyPackages.${system};
in
nixpkgs.legacyPackages.${system}.mkShell {
pkgs.mkShell {
inputsFrom = builtins.attrValues packages_inst;
shellHook = ''
export NIXPKGS_PANDOC_FILTERS_PATH="${packages_inst.flake_info.NIXPKGS_PANDOC_FILTERS_PATH}";
export RUST_SRC_PATH="${pkgs.rustPlatform.rustLibSrc}";
export NIXPKGS_PANDOC_FILTERS_PATH="${packages_inst.flake-info.NIXPKGS_PANDOC_FILTERS_PATH}";
'';
};
in
{
defaultPackage = forAllSystems (mkPackage ./.);
packages = forAllSystems packages;
devShell = forAllSystems devShell;
};
{
defaultPackage = forAllSystems (mkPackage ./.);
packages = forAllSystems packages;
devShell = forAllSystems devShell;
};
}