diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-12-30 11:35:14 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-12-30 11:35:14 +0100 |
commit | dce2c3c26a2ff9770bbba2a00471c03ab321c472 (patch) | |
tree | 91ce56182bab4dee87fd663ea70880446a15f7e7 /packages | |
parent | Font: Change font style pt 1000 (diff) | |
download | nixos-config-dce2c3c26a2ff9770bbba2a00471c03ab321c472.tar.gz nixos-config-dce2c3c26a2ff9770bbba2a00471c03ab321c472.tar.bz2 nixos-config-dce2c3c26a2ff9770bbba2a00471c03ab321c472.zip |
fmt
Diffstat (limited to 'packages')
-rw-r--r-- | packages/default.nix | 9 | ||||
-rw-r--r-- | packages/kindlegen/default.nix | 88 | ||||
-rw-r--r-- | packages/lemacs/default.nix | 2 | ||||
-rw-r--r-- | packages/swhkd/default.nix | 11 |
4 files changed, 61 insertions, 49 deletions
diff --git a/packages/default.nix b/packages/default.nix index 33866ca..f6387ff 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,8 +1,7 @@ -final: prev: -{ +final: prev: { custom = { - kindlegen = prev.callPackage ./kindlegen { }; - lemacs = prev.callPackage ./lemacs { }; - swhkd = prev.callPackage ./swhkd { }; + kindlegen = prev.callPackage ./kindlegen {}; + lemacs = prev.callPackage ./lemacs {}; + swhkd = prev.callPackage ./swhkd {}; }; } diff --git a/packages/kindlegen/default.nix b/packages/kindlegen/default.nix index dd86dec..f96d0c8 100644 --- a/packages/kindlegen/default.nix +++ b/packages/kindlegen/default.nix @@ -1,42 +1,50 @@ -{ fetchurl, lib, stdenv, unzip }: - -let +{ + fetchurl, + lib, + stdenv, + unzip, +}: let version = "2.9"; - fileVersion = builtins.replaceStrings [ "." ] [ "_" ] version; - - sha256 = { - x86_64-linux = "sha256-2ZLFM5YcV2Ym38hxU8WMrRDjHDF6edqYohLeM+ASgpk="; - }.${stdenv.hostPlatform.system} or (throw "system #{stdenv.hostPlatform.system.} is not supported"); - - url = { - x86_64-linux = "https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz"; - }.${stdenv.hostPlatform.system} or (throw "system #{stdenv.hostPlatform.system.} is not supported"); - + fileVersion = builtins.replaceStrings ["."] ["_"] version; + + sha256 = + { + x86_64-linux = "sha256-2ZLFM5YcV2Ym38hxU8WMrRDjHDF6edqYohLeM+ASgpk="; + } + .${stdenv.hostPlatform.system} + or (throw "system #{stdenv.hostPlatform.system.} is not supported"); + + url = + { + x86_64-linux = "https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz"; + } + .${stdenv.hostPlatform.system} + or (throw "system #{stdenv.hostPlatform.system.} is not supported"); in -stdenv.mkDerivation { - pname = "kindlegen"; - inherit version; - - src = fetchurl { - inherit url; - inherit sha256; - }; - - sourceRoot = "."; - - nativeBuildInputs = lib.optional (lib.hasSuffix ".zip" url) unzip; - - installPhase = '' - mkdir -p $out/bin $out/share/kindlegen/doc - install -m755 kindlegen $out/bin/kindlegen - cp -r *.txt *.html docs/* $out/share/kindlegen/doc - ''; - - meta = with lib; { - description = "Convert documents to .mobi for use with Amazon Kindle"; - homepage = "https://www.amazon.com/gp/feature.html?docId=1000765211"; - license = licenses.unfree; - maintainers = with maintainers; [ peterhoeg ]; - platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "i686-darwin" "x86_64-cygwin" "i686-cygwin" ]; - }; -} + stdenv.mkDerivation { + pname = "kindlegen"; + inherit version; + + src = fetchurl { + inherit url; + inherit sha256; + }; + + sourceRoot = "."; + + nativeBuildInputs = lib.optional (lib.hasSuffix ".zip" url) unzip; + + installPhase = '' + mkdir -p $out/bin $out/share/kindlegen/doc + install -m755 kindlegen $out/bin/kindlegen + cp -r *.txt *.html docs/* $out/share/kindlegen/doc + ''; + + meta = with lib; { + description = "Convert documents to .mobi for use with Amazon Kindle"; + homepage = "https://www.amazon.com/gp/feature.html?docId=1000765211"; + license = licenses.unfree; + maintainers = with maintainers; [peterhoeg]; + platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin" "i686-darwin" "x86_64-cygwin" "i686-cygwin"]; + }; + } diff --git a/packages/lemacs/default.nix b/packages/lemacs/default.nix index b6ad489..fdf6341 100644 --- a/packages/lemacs/default.nix +++ b/packages/lemacs/default.nix @@ -1,4 +1,4 @@ -{ writeShellScriptBin, ... }: +{writeShellScriptBin, ...}: writeShellScriptBin "lemacs" '' if [ -n "$DISPLAY" ]; then emacsclient -a "" -n -c "$@" diff --git a/packages/swhkd/default.nix b/packages/swhkd/default.nix index 4682a36..3bf5091 100644 --- a/packages/swhkd/default.nix +++ b/packages/swhkd/default.nix @@ -1,4 +1,9 @@ -{ rustPlatform, fetchFromGitHub, pkgs, ... }: +{ + rustPlatform, + fetchFromGitHub, + pkgs, + ... +}: rustPlatform.buildRustPackage rec { name = "swhkd"; @@ -6,7 +11,7 @@ rustPlatform.buildRustPackage rec { pkgconfig ]; - buildInputs = with pkgs; [ systemd ]; + buildInputs = with pkgs; [systemd]; src = fetchFromGitHub { owner = "waycrate"; @@ -17,5 +22,5 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-E5AE18CfeX1HI/FbGDFoUDsPyG/CpJrD+8Ky7c+EQUw="; } - # Doesn't yet work because NixOS' kernel isn't compiled with CONFIG_RFKILL_INPUT=y + |