* add direnv support * elm format * use flake-utils * remove unused parts of the code * only use one workflow to import things * Build flake-info in separate job * DEBUG * Revert "DEBUG" This reverts commit 6c335e6bd2ba450f1891efe70dfd9bb95f300b31. * RUST_LOG is a runtime thing
49 lines
1.4 KiB
Nix
49 lines
1.4 KiB
Nix
{
|
|
description = "Code behind search.nixos.org";
|
|
|
|
nixConfig = {
|
|
extra-substituters = [ "https://nixos-search.cachix.org" ];
|
|
extra-trusted-public-keys = [ "nixos-search.cachix.org-1:1HV3YF8az4fywnH+pAd+CXFEdpTXtv9WpoivPi+H70o=" ];
|
|
};
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self
|
|
, nixpkgs
|
|
, flake-utils
|
|
}:
|
|
flake-utils.lib.eachSystem
|
|
(with flake-utils.lib.system; [
|
|
x86_64-linux
|
|
i686-linux
|
|
x86_64-darwin
|
|
aarch64-linux
|
|
])
|
|
(system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
warnToUpgradeNix = pkgs.lib.warn "Please upgrade Nix to 2.7 or later.";
|
|
in rec {
|
|
|
|
packages.default = packages.flake-info;
|
|
packages.flake-info = import ./flake-info { inherit pkgs; };
|
|
packages.frontend = import ./. { inherit pkgs; };
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
inputsFrom = builtins.attrValues packages;
|
|
shellHook = ''
|
|
export RUST_SRC_PATH="${pkgs.rustPlatform.rustLibSrc}";
|
|
export NIXPKGS_PANDOC_FILTERS_PATH="${packages.flake-info.NIXPKGS_PANDOC_FILTERS_PATH}";
|
|
'';
|
|
};
|
|
|
|
# XXX: for backwards compatibility
|
|
devShell = warnToUpgradeNix devShells.default;
|
|
defaultPackage = warnToUpgradeNix packages.default;
|
|
}
|
|
);
|
|
}
|