diff --git a/default.nix b/default.nix index 193ac7a..2c98dc4 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,7 @@ -{ system ? builtins.currentSystem, pkgs ? import { inherit system; } +{ + system ? builtins.currentSystem, + pkgs ? import {inherit system;}, }: rec { -} // import ./pkgs { inherit pkgs; } +} +// import ./pkgs {inherit pkgs;} diff --git a/flake.nix b/flake.nix index 2586a60..e5cb01a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,12 +1,15 @@ { description = "My personal NUR repository"; - inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; - outputs = { self, nixpkgs, }@inputs: - let - systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ]; - forAllSystems = nixpkgs.lib.genAttrs systems; - in { - packages = forAllSystems (system: - import ./default.nix { pkgs = import nixpkgs { inherit system; }; }); - }; + inputs = {nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";}; + outputs = { + self, + nixpkgs, + } @ inputs: let + systems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux"]; + forAllSystems = nixpkgs.lib.genAttrs systems; + in { + packages = + forAllSystems (system: + import ./default.nix {pkgs = import nixpkgs {inherit system;};}); + }; } diff --git a/pkgs/adb-sync/default.nix b/pkgs/adb-sync/default.nix index e337a47..6645814 100644 --- a/pkgs/adb-sync/default.nix +++ b/pkgs/adb-sync/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: stdenv.mkDerivation rec { pname = "adb-sync"; version = "1.0.0"; @@ -18,8 +20,7 @@ stdenv.mkDerivation rec { meta = with pkgs.lib; { homepage = "https://github.com/google/adb-sync"; - description = - "adb-sync is a tool to synchronize files between a PC and an Android device using the ADB (Android Debug Bridge)"; + description = "adb-sync is a tool to synchronize files between a PC and an Android device using the ADB (Android Debug Bridge)"; license = licenses.asl20; platforms = platforms.all; }; diff --git a/pkgs/adx/default.nix b/pkgs/adx/default.nix index 9cd055a..58eafa7 100644 --- a/pkgs/adx/default.nix +++ b/pkgs/adx/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "adx"; version = "4.4.0"; @@ -11,14 +13,14 @@ pkgs.rustPlatform.buildRustPackage rec { sha256 = "sha256-LA1qO1dzQd1nmggJnQcgUlj766Ax1nY80zL0eitTl4A="; }; - buildInputs = pkgs.lib.optionals stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.Security ]; + buildInputs = + pkgs.lib.optionals stdenv.isDarwin + [pkgs.darwin.apple_sdk.frameworks.Security]; cargoSha256 = "sha256-FRxWGbQgUXR4b1PO9YEpXk87vyeqD023RD9aeBx+JzE="; meta = with pkgs.lib; { - description = - "Rust binary that polls Google's Maven repository and extracts the latest version of all dependencies, with as few network calls as possible."; + description = "Rust binary that polls Google's Maven repository and extracts the latest version of all dependencies, with as few network calls as possible."; homepage = "https://github.com/msfjarvis/androidx-release-watcher"; license = licenses.mit; platforms = platforms.all; diff --git a/pkgs/bundletool-bin/default.nix b/pkgs/bundletool-bin/default.nix index 3ef9dba..1889f7c 100644 --- a/pkgs/bundletool-bin/default.nix +++ b/pkgs/bundletool-bin/default.nix @@ -1,11 +1,12 @@ -{ pkgs, lib }: - +{ + pkgs, + lib, +}: pkgs.stdenv.mkDerivation rec { pname = "bundletool-bin"; version = "1.13.2"; src = pkgs.fetchurl { - url = - "https://github.com/google/bundletool/releases/download/${version}/bundletool-all-${version}.jar"; + url = "https://github.com/google/bundletool/releases/download/${version}/bundletool-all-${version}.jar"; sha256 = "sha256-sbX7IYFcU9gwKzHKC8xtmZKVE2XImeNT4RYOx+cSI2Y="; }; @@ -19,8 +20,7 @@ pkgs.stdenv.mkDerivation rec { ''; meta = with lib; { - description = - "Bundletool is a command-line tool to manipulate Android App Bundles"; + description = "Bundletool is a command-line tool to manipulate Android App Bundles"; homepage = "https://g.co/androidappbundle"; license = licenses.asl20; platforms = platforms.all; diff --git a/pkgs/clipboard-substitutor/default.nix b/pkgs/clipboard-substitutor/default.nix index 9badfd0..eabfeec 100644 --- a/pkgs/clipboard-substitutor/default.nix +++ b/pkgs/clipboard-substitutor/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "clipboard-substitutor"; version = "0.7.3"; @@ -11,17 +13,17 @@ pkgs.rustPlatform.buildRustPackage rec { sha256 = "sha256-3yPL46SJBOEIcWaJPLJ8UNyRmtaTN43TMHgjHzBpUwY="; }; - buildFeatures = pkgs.lib.optionals stdenv.isLinux [ "journald" ]; + buildFeatures = pkgs.lib.optionals stdenv.isLinux ["journald"]; cargoSha256 = "sha256-1nutZIzeKGZO8u2m9wsNi0CHgpIKsyfLDi/EgZGXvsY="; - nativeBuildInputs = [ pkgs.pkg-config pkgs.python3 ]; - buildInputs = pkgs.lib.optionals stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.AppKit ] - ++ pkgs.lib.optionals stdenv.isLinux [ pkgs.xorg.libxcb ]; + nativeBuildInputs = [pkgs.pkg-config pkgs.python3]; + buildInputs = + pkgs.lib.optionals stdenv.isDarwin + [pkgs.darwin.apple_sdk.frameworks.AppKit] + ++ pkgs.lib.optionals stdenv.isLinux [pkgs.xorg.libxcb]; meta = with pkgs.lib; { - description = - "CLI tool to monitor clipboard contents and perform actions based on a set of matchers"; + description = "CLI tool to monitor clipboard contents and perform actions based on a set of matchers"; homepage = "https://msfjarvis.dev/g/clipboard-substitutor"; license = licenses.mit; platforms = platforms.all; diff --git a/pkgs/default.nix b/pkgs/default.nix index a8dfeab..33f8d1f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,20 +1,20 @@ -{ pkgs }: -let callPackage = pkg: pkgs.callPackage pkg; +{pkgs}: let + callPackage = pkg: pkgs.callPackage pkg; in { - adb-sync = callPackage ./adb-sync { inherit pkgs; }; - adx = callPackage ./adx { inherit pkgs; }; - bundletool-bin = callPackage ./bundletool-bin { inherit pkgs; }; - clipboard-substitutor = callPackage ./clipboard-substitutor { inherit pkgs; }; - diffuse-bin = callPackage ./diffuse-bin { inherit pkgs; }; - file-collector = callPackage ./file-collector { inherit pkgs; }; - gdrive = callPackage ./gdrive { inherit pkgs; }; - hcctl = callPackage ./hcctl { inherit pkgs; }; - healthchecks-monitor = callPackage ./healthchecks-monitor { inherit pkgs; }; - hyperlink = callPackage ./hyperlink { inherit pkgs; }; - katbin = callPackage ./katbin { inherit pkgs; }; - linkleaner = callPackage ./linkleaner { inherit pkgs; }; - pidcat = callPackage ./pidcat { inherit pkgs; }; - topgrade-og = callPackage ./topgrade-og { inherit pkgs; }; - twt = callPackage ./twt { inherit pkgs; }; - when = callPackage ./when { inherit pkgs; }; + adb-sync = callPackage ./adb-sync {inherit pkgs;}; + adx = callPackage ./adx {inherit pkgs;}; + bundletool-bin = callPackage ./bundletool-bin {inherit pkgs;}; + clipboard-substitutor = callPackage ./clipboard-substitutor {inherit pkgs;}; + diffuse-bin = callPackage ./diffuse-bin {inherit pkgs;}; + file-collector = callPackage ./file-collector {inherit pkgs;}; + gdrive = callPackage ./gdrive {inherit pkgs;}; + hcctl = callPackage ./hcctl {inherit pkgs;}; + healthchecks-monitor = callPackage ./healthchecks-monitor {inherit pkgs;}; + hyperlink = callPackage ./hyperlink {inherit pkgs;}; + katbin = callPackage ./katbin {inherit pkgs;}; + linkleaner = callPackage ./linkleaner {inherit pkgs;}; + pidcat = callPackage ./pidcat {inherit pkgs;}; + topgrade-og = callPackage ./topgrade-og {inherit pkgs;}; + twt = callPackage ./twt {inherit pkgs;}; + when = callPackage ./when {inherit pkgs;}; } diff --git a/pkgs/diffuse-bin/default.nix b/pkgs/diffuse-bin/default.nix index a61d1a5..2cb6316 100644 --- a/pkgs/diffuse-bin/default.nix +++ b/pkgs/diffuse-bin/default.nix @@ -1,11 +1,12 @@ -{ pkgs, lib }: - +{ + pkgs, + lib, +}: pkgs.stdenv.mkDerivation rec { pname = "diffuse-bin"; version = "0.1.0"; src = pkgs.fetchurl { - url = - "https://github.com/JakeWharton/diffuse/releases/download/${version}/diffuse-${version}-binary.jar"; + url = "https://github.com/JakeWharton/diffuse/releases/download/${version}/diffuse-${version}-binary.jar"; sha256 = "sha256-YNYZNzxGpdBrgSbB1h4K3Bi3Lyy7kkXvkg0zh+RLhs8="; }; diff --git a/pkgs/file-collector/default.nix b/pkgs/file-collector/default.nix index 26e1f8e..a4aa442 100644 --- a/pkgs/file-collector/default.nix +++ b/pkgs/file-collector/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "file-collector"; version = "0.2.5"; @@ -11,12 +13,11 @@ pkgs.rustPlatform.buildRustPackage rec { sha256 = "sha256-ch1Qzm9a/Fjgr1jV5bc4XRjbmVehGOan5xLIAkDjAzk="; }; - buildFeatures = pkgs.lib.optionals stdenv.isLinux [ "journald" ]; + buildFeatures = pkgs.lib.optionals stdenv.isLinux ["journald"]; cargoSha256 = "sha256-yXV5dFdPprrURFDvmu38G5BzTPNdhv8cHiASd1KGftM="; meta = with pkgs.lib; { - description = - "Simple CLI tool to watch directories and move their files to a single dumping ground"; + description = "Simple CLI tool to watch directories and move their files to a single dumping ground"; homepage = "https://msfjarvis.dev/g/file-collector"; license = licenses.mit; platforms = platforms.all; diff --git a/pkgs/gdrive/default.nix b/pkgs/gdrive/default.nix index 7ec9b5e..a2dd133 100644 --- a/pkgs/gdrive/default.nix +++ b/pkgs/gdrive/default.nix @@ -1,5 +1,7 @@ -{ pkgs, lib }: - +{ + pkgs, + lib, +}: pkgs.buildGo119Module rec { pname = "gdrive"; version = "3.0.13"; diff --git a/pkgs/hcctl/default.nix b/pkgs/hcctl/default.nix index fda37f7..302cd98 100644 --- a/pkgs/hcctl/default.nix +++ b/pkgs/hcctl/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "hcctl"; version = "2.0.5"; @@ -11,17 +13,17 @@ pkgs.rustPlatform.buildRustPackage rec { sha256 = "sha256-KCV2AWdd3reh6B2ghnj/9yOtt+B38esuPk+aTnuXXNQ="; }; - nativeBuildInputs = [ pkgs.pkg-config ]; - buildInputs = pkgs.lib.optionals stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.Security ]; + nativeBuildInputs = [pkgs.pkg-config]; + buildInputs = + pkgs.lib.optionals stdenv.isDarwin + [pkgs.darwin.apple_sdk.frameworks.Security]; buildAndTestSubdir = "hcctl"; cargoSha256 = "sha256-0xHrnlGxKczogSyAHYRzv9FsB9GJm1pCebuqsTBBlp8="; meta = with pkgs.lib; { - description = - "Simple CLI tool to keep a track of your https://healthchecks.io account"; + description = "Simple CLI tool to keep a track of your https://healthchecks.io account"; homepage = "https://msfjarvis.dev/g/healthchecks-rs"; license = licenses.mit; platforms = platforms.all; diff --git a/pkgs/healthchecks-monitor/default.nix b/pkgs/healthchecks-monitor/default.nix index e685617..c7dac90 100644 --- a/pkgs/healthchecks-monitor/default.nix +++ b/pkgs/healthchecks-monitor/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "healthchecks-monitor"; version = "3.0.3"; @@ -11,17 +13,17 @@ pkgs.rustPlatform.buildRustPackage rec { sha256 = "sha256-KCV2AWdd3reh6B2ghnj/9yOtt+B38esuPk+aTnuXXNQ="; }; - nativeBuildInputs = [ pkgs.pkg-config ]; - buildInputs = pkgs.lib.optionals stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.Security ]; + nativeBuildInputs = [pkgs.pkg-config]; + buildInputs = + pkgs.lib.optionals stdenv.isDarwin + [pkgs.darwin.apple_sdk.frameworks.Security]; buildAndTestSubdir = "monitor"; cargoSha256 = "sha256-Wrjsn7D4OplCRkAez+VFLd8CLsQNiQUEIUW1ZTrt+C4="; meta = with pkgs.lib; { - description = - "CLI tool to run shell jobs and report status to https://healthchecks.io"; + description = "CLI tool to run shell jobs and report status to https://healthchecks.io"; homepage = "https://msfjarvis.dev/g/healthchecks-rs"; license = licenses.mit; platforms = platforms.all; diff --git a/pkgs/hyperlink/default.nix b/pkgs/hyperlink/default.nix index 585a2a3..8ebd594 100644 --- a/pkgs/hyperlink/default.nix +++ b/pkgs/hyperlink/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "hyperlink"; version = "0.1.26"; diff --git a/pkgs/katbin/default.nix b/pkgs/katbin/default.nix index f6af179..5a6c6af 100644 --- a/pkgs/katbin/default.nix +++ b/pkgs/katbin/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "katbin"; version = "1.3.13"; @@ -11,8 +13,9 @@ pkgs.rustPlatform.buildRustPackage rec { sha256 = "sha256-thL2NUaE6UNPiEjsmNHcbcF7/Rs2JZcPDQq5sL0roYU="; }; - buildInputs = pkgs.lib.optionals stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.Security ]; + buildInputs = + pkgs.lib.optionals stdenv.isDarwin + [pkgs.darwin.apple_sdk.frameworks.Security]; cargoSha256 = "sha256-qfeHd6ry1NhKFH3UnQggJRF4nWnkr47kr4bL5W9Yo3E="; diff --git a/pkgs/linkleaner/default.nix b/pkgs/linkleaner/default.nix index ced4a52..54e602e 100644 --- a/pkgs/linkleaner/default.nix +++ b/pkgs/linkleaner/default.nix @@ -1,45 +1,47 @@ -{ stdenv, pkgs }: - -let +{ + stdenv, + pkgs, +}: let rust-overlay = import (builtins.fetchTarball { - url = - "https://github.com/oxalica/rust-overlay/archive/7da2f6b3a0c32f661cb2864d7fbd1d7e6f0c7543.tar.gz"; + url = "https://github.com/oxalica/rust-overlay/archive/7da2f6b3a0c32f661cb2864d7fbd1d7e6f0c7543.tar.gz"; sha256 = "sha256-gvQaOKaV1UK6IzsFzkVLsEavGxnAsQFT3zUqcg0RXLU="; }); - rustPkgs = if pkgs.lib.hasAttrByPath [ "rust-bin" ] pkgs then - pkgs - else - pkgs.lib.fix (pkgs.lib.extends rust-overlay (self: pkgs)); + rustPkgs = + if pkgs.lib.hasAttrByPath ["rust-bin"] pkgs + then pkgs + else pkgs.lib.fix (pkgs.lib.extends rust-overlay (self: pkgs)); rustSpecific = rustPkgs.rust-bin.nightly."2022-12-15".default.override { - extensions = [ ]; - targets = pkgs.lib.optionals pkgs.stdenv.isDarwin [ "aarch64-apple-darwin" ] - ++ pkgs.lib.optionals pkgs.stdenv.isLinux [ "x86_64-unknown-linux-gnu" ]; + extensions = []; + targets = + pkgs.lib.optionals pkgs.stdenv.isDarwin ["aarch64-apple-darwin"] + ++ pkgs.lib.optionals pkgs.stdenv.isLinux ["x86_64-unknown-linux-gnu"]; }; nightlyRustPlatform = rustPkgs.makeRustPlatform { cargo = rustSpecific; rustc = rustSpecific; }; +in + nightlyRustPlatform.buildRustPackage rec { + pname = "linkleaner"; + version = "1.1.0"; -in nightlyRustPlatform.buildRustPackage rec { - pname = "linkleaner"; - version = "1.1.0"; + src = pkgs.fetchFromGitHub { + owner = "msfjarvis"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-feXKW9ytssgT+IEmRe86WiuH9j2aBVOPVqwFXrA4BMU="; + }; - src = pkgs.fetchFromGitHub { - owner = "msfjarvis"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-feXKW9ytssgT+IEmRe86WiuH9j2aBVOPVqwFXrA4BMU="; - }; + buildInputs = + pkgs.lib.optionals stdenv.isDarwin + [pkgs.darwin.apple_sdk.frameworks.Security]; - buildInputs = pkgs.lib.optionals stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.Security ]; + cargoSha256 = "sha256-Iuazco7vAVNwy/hfzFBNL7eiN9sTXXNx176NaPngNQE="; - cargoSha256 = "sha256-Iuazco7vAVNwy/hfzFBNL7eiN9sTXXNx176NaPngNQE="; - - meta = with pkgs.lib; { - description = "A Telegram bot with an identity crisis"; - homepage = "https://msfjarvis.dev/g/linkleaner/"; - license = licenses.mit; - platforms = platforms.all; - }; -} + meta = with pkgs.lib; { + description = "A Telegram bot with an identity crisis"; + homepage = "https://msfjarvis.dev/g/linkleaner/"; + license = licenses.mit; + platforms = platforms.all; + }; + } diff --git a/pkgs/pidcat/default.nix b/pkgs/pidcat/default.nix index d4d429d..0b8f916 100644 --- a/pkgs/pidcat/default.nix +++ b/pkgs/pidcat/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: stdenv.mkDerivation rec { pname = "pidcat"; version = "2.2.0"; @@ -13,7 +15,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-VOIND2CzWo+LV84C+FbTC0r3FqY7VpBaWn95IKTYFT8="; }; - nativeBuildInputs = [ pkgs.installShellFiles ]; + nativeBuildInputs = [pkgs.installShellFiles]; postInstall = '' installShellCompletion --bash bash_completion.d/pidcat diff --git a/pkgs/topgrade-og/default.nix b/pkgs/topgrade-og/default.nix index 570f5fd..6a0fcba 100644 --- a/pkgs/topgrade-og/default.nix +++ b/pkgs/topgrade-og/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "topgrade"; version = "9.0.1"; @@ -18,7 +20,7 @@ pkgs.rustPlatform.buildRustPackage rec { pkgs.darwin.apple_sdk.frameworks.Foundation ]; - nativeBuildInputs = [ pkgs.installShellFiles ]; + nativeBuildInputs = [pkgs.installShellFiles]; postInstall = '' installManPage topgrade.8 @@ -28,7 +30,7 @@ pkgs.rustPlatform.buildRustPackage rec { description = "Upgrade all the things"; homepage = "https://github.com/r-darwish/topgrade"; license = licenses.gpl3Only; - maintainers = with maintainers; [ msfjarvis ]; + maintainers = with maintainers; [msfjarvis]; broken = stdenv.isDarwin; }; } diff --git a/pkgs/twt/default.nix b/pkgs/twt/default.nix index 30e0fb1..20351d7 100644 --- a/pkgs/twt/default.nix +++ b/pkgs/twt/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "twt"; version = "1.0.1"; @@ -11,8 +13,9 @@ pkgs.rustPlatform.buildRustPackage rec { sha256 = "sha256-wq3pQNR72EQqeiWbC82ZXTg10601BC2x8mjkLsi6dzA="; }; - buildInputs = pkgs.lib.optionals stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.Security ]; + buildInputs = + pkgs.lib.optionals stdenv.isDarwin + [pkgs.darwin.apple_sdk.frameworks.Security]; cargoSha256 = "sha256-WaQocM8BTad+y5fpKg3HZE1U1u4Xl5+NW5eeTIQTiTE="; diff --git a/pkgs/when/default.nix b/pkgs/when/default.nix index f3ef62b..00394aa 100644 --- a/pkgs/when/default.nix +++ b/pkgs/when/default.nix @@ -1,5 +1,7 @@ -{ stdenv, pkgs }: - +{ + stdenv, + pkgs, +}: pkgs.rustPlatform.buildRustPackage rec { pname = "when"; version = "0.4.0"; diff --git a/shell.nix b/shell.nix index cfe9bd6..1c8e4ac 100644 --- a/shell.nix +++ b/shell.nix @@ -1,3 +1,2 @@ -{ pkgs ? import { } }: - -pkgs.mkShell { buildInputs = with pkgs; [ alejandra git micro nix-update shfmt ]; } +{pkgs ? import {}}: +pkgs.mkShell {buildInputs = with pkgs; [alejandra git micro nix-update shfmt];}