mirror of
https://github.com/snowfallorg/nix-software-center.git
synced 2024-08-17 09:00:35 +03:00
I recently added a flake for nixos-appstream-data. This allows us to depend on that flake instead of doing an IFD to load its default.nix. An IFD in nix-software-center is problematic for users who use flakes and have multiple nixos configurations with different architectures. Because of https://github.com/NixOS/nix/issues/4265 this causes `nix flake check` to fail for them. Note that users of nix-software-center that do not rely on the flake will still need an IFD. I'm not aware of a better way (other than upstreaming both in nixpkgs). Ref: https://github.com/snowfallorg/nixos-appstream-data/pull/1
74 lines
2.0 KiB
Nix
74 lines
2.0 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
nixos-appstream-data = {
|
|
url = "github:korfuri/nixos-appstream-data/flake";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "utils";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils, nixos-appstream-data, ... }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
};
|
|
in
|
|
rec
|
|
{
|
|
packages = let
|
|
nix-software-center = pkgs.callPackage ./default.nix { inherit (nixos-appstream-data.packages."${system}") nixos-appstream-data; };
|
|
in {
|
|
inherit nix-software-center;
|
|
default = nix-software-center;
|
|
};
|
|
|
|
checks = self.packages.${system};
|
|
hydraJobs = self.packages.${system};
|
|
|
|
devShell = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
cargo
|
|
clippy
|
|
desktop-file-utils
|
|
rust-analyzer
|
|
rustc
|
|
rustfmt
|
|
cairo
|
|
gdk-pixbuf
|
|
gobject-introspection
|
|
graphene
|
|
gtk4
|
|
gtksourceview5
|
|
libadwaita
|
|
libxml2
|
|
meson
|
|
ninja
|
|
openssl
|
|
pandoc
|
|
pango
|
|
pkg-config
|
|
polkit
|
|
sqlite
|
|
wrapGAppsHook4
|
|
nixos-appstream-data.packages."${system}".nixos-appstream-data
|
|
];
|
|
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
|
};
|
|
})
|
|
// {
|
|
overlays = {
|
|
pkgs = final: prev: {
|
|
nix-software-center = self.packages.${final.system}.nix-software-center;
|
|
};
|
|
nixSoftwareCenterPkgs = final: prev: {
|
|
nixSoftwareCenterPkgs = self.packages.${prev.system};
|
|
};
|
|
default = self.overlays.nixSoftwareCenterPkgs;
|
|
};
|
|
overlay = self.overlays.pkgs;
|
|
};
|
|
}
|