5
.github/workflows/cachix.yml
vendored
5
.github/workflows/cachix.yml
vendored
@@ -45,17 +45,16 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: cachix/install-nix-action@v26
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
authToken: ${{ secrets.CACHIX_TOKEN }}
|
||||
extraPullNames: nix-community
|
||||
name: anyrun
|
||||
|
||||
- name: Set default git branch (to reduce log spam)
|
||||
run: git config --global init.defaultBranch main
|
||||
|
||||
- name: Build anyrun from the defined matrix
|
||||
run: nix build .#${{ matrix.package }} --print-build-logs
|
||||
run: nix build .#${{ matrix.package }} --print-build-logs --extra-substituters "https://anyrun.cachix.org"
|
||||
|
||||
30
flake.lock
generated
30
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696343447,
|
||||
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
|
||||
"lastModified": 1717285511,
|
||||
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
|
||||
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -22,11 +22,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1696193975,
|
||||
"narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=",
|
||||
"lastModified": 1717196966,
|
||||
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242",
|
||||
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -39,7 +39,23 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
97
flake.nix
97
flake.nix
@@ -3,6 +3,7 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
@@ -12,18 +13,15 @@
|
||||
outputs = inputs @ {flake-parts, ...}:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
imports = [flake-parts.flakeModules.easyOverlay];
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
systems = import inputs.systems;
|
||||
|
||||
perSystem = {
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
config,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
inherit (lib) getExe;
|
||||
inherit (pkgs) callPackage;
|
||||
in {
|
||||
# provide the formatter for nix fmt
|
||||
formatter = pkgs.alejandra;
|
||||
@@ -45,78 +43,47 @@
|
||||
|
||||
packages = let
|
||||
lockFile = ./Cargo.lock;
|
||||
in rec {
|
||||
anyrun = pkgs.callPackage ./nix/default.nix {inherit inputs lockFile;};
|
||||
# alias nix build .# to anyrun
|
||||
default = anyrun;
|
||||
|
||||
# Since all plugin derivations are called with the exact same arguments
|
||||
# it is possible to streamline calling packages with a single function
|
||||
# that takes name as an argument, and handles default inherits.
|
||||
mkPlugin = name:
|
||||
callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
inherit name;
|
||||
};
|
||||
in {
|
||||
default = self'.packages.anyrun;
|
||||
anyrun = callPackage ./nix/default.nix {inherit inputs lockFile;};
|
||||
|
||||
anyrun-with-all-plugins = pkgs.callPackage ./nix/default.nix {
|
||||
inherit inputs lockFile;
|
||||
dontBuildPlugins = false;
|
||||
};
|
||||
|
||||
# expose each plugin as a package
|
||||
applications = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "applications";
|
||||
};
|
||||
|
||||
dictionary = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "dictionary";
|
||||
};
|
||||
|
||||
kidex = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "kidex";
|
||||
};
|
||||
|
||||
randr = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "randr";
|
||||
};
|
||||
|
||||
rink = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "rink";
|
||||
};
|
||||
|
||||
shell = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "shell";
|
||||
};
|
||||
|
||||
stdin = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "stdin";
|
||||
};
|
||||
|
||||
symbols = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "symbols";
|
||||
};
|
||||
|
||||
translate = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "translate";
|
||||
};
|
||||
|
||||
websearch = pkgs.callPackage ./nix/plugins/default.nix {
|
||||
inherit inputs lockFile;
|
||||
name = "websearch";
|
||||
};
|
||||
# Expose each plugin as a separate package. This uses the mkPlugin function
|
||||
# to call the same derivation with same default inherits and the name of the
|
||||
# plugin every time.
|
||||
applications = mkPlugin "applications";
|
||||
dictionary = mkPlugin "dictionary";
|
||||
kidex = mkPlugin "kidex";
|
||||
randr = mkPlugin "randr";
|
||||
rink = mkPlugin "rink";
|
||||
shell = mkPlugin "shell";
|
||||
stdin = mkPlugin "stdin";
|
||||
symbols = mkPlugin "symbols";
|
||||
translate = mkPlugin "translate";
|
||||
websearch = mkPlugin "websearch";
|
||||
};
|
||||
|
||||
# Set up an overlay from packages exposed by this flake
|
||||
overlayAttrs = config.packages;
|
||||
};
|
||||
|
||||
flake = _: rec {
|
||||
nixosModules.home-manager = homeManagerModules.default;
|
||||
|
||||
homeManagerModules = rec {
|
||||
flake = {self, ...}: {
|
||||
homeManagerModules = {
|
||||
anyrun = import ./nix/hm-module.nix inputs.self;
|
||||
default = anyrun;
|
||||
default = self.homeManagerModules.anyrun;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -66,10 +66,10 @@ in
|
||||
--prefix ANYRUN_PLUGINS : $out/lib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "A wayland native, highly customizable runner.";
|
||||
homepage = "https://github.com/Kirottu/anyrun";
|
||||
license = with licenses; [gpl3];
|
||||
license = with lib.licenses; [gpl3];
|
||||
maintainers = [
|
||||
{
|
||||
email = "neo@neoney.dev";
|
||||
|
||||
Reference in New Issue
Block a user