diff --git a/flake.nix b/flake.nix index 70a671d..5147b3e 100644 --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,7 @@ inherit (self) outputs; lib = nixpkgs.lib // home-manager.lib; systems = [ "aarch64-linux" "i686-linux" "x86_64-linux" ]; - forEachSystem = f: lib.genAttrs systems (sys: f pkgs.${sys}); + forEachSystem = f: lib.genAttrs systems (sys: f pkgsFor.${sys}); pkgsFor = nixpkgs.legacyPackages; in { @@ -53,7 +53,7 @@ homeConfigurations = { "hblobner@devvie" = lib.homeManagerConfiguration { - modules = [ ./users/hblober@devvie.nix ]; + modules = [ "./users/hblober@devvie.nix" ]; pkgs = pkgsFor.x86_64-linux; extraSpecialArgs = { inherit inputs outputs; }; }; diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..173d701 --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,6 @@ +{ pkgs ? import { } }: rec { + + # Packages with an actual source + speedtestpp = pkgs.callPackage ./speedtestpp { }; +} + diff --git a/pkgs/speedtestpp/default.nix b/pkgs/speedtestpp/default.nix new file mode 100644 index 0000000..a6c3d56 --- /dev/null +++ b/pkgs/speedtestpp/default.nix @@ -0,0 +1,23 @@ +{ stdenv, lib, fetchFromGitHub, cmake, curl, openssl, libxml2 }: +stdenv.mkDerivation rec { + pname = "speedtestpp"; + version = "2021-08-29"; + src = fetchFromGitHub { + owner = "taganaka"; + repo = "speedtest"; + rev = "0f63cfbf7ce8d64ea803bf143b957eae76323405"; + sha256 = "sha256-rGY0kK2OCZl+229/JERf2ghBSdvAedhVuL4SrVzYFmU="; + }; + nativeBuildInputs = [ cmake curl openssl libxml2 ]; + postInstall = '' + ln -s $out/bin/SpeedTest $out/bin/speedtestpp + ''; + + meta = with lib; { + description = "Unofficial speedtest.net cli using raw TCP for better accuracy"; + homepage = "https://github.com/taganaka/SpeedTest"; + license = licenses.mit; + platforms = platforms.linux; + }; +} +