├── .github ├── dependabot.yml └── workflows │ ├── build.yml │ └── bump.yml ├── .gitignore ├── LICENSE ├── README.md ├── ci.nix ├── debug.log ├── default.nix ├── flake.lock ├── flake.nix ├── lib └── default.nix ├── modules ├── default.nix └── hm │ ├── default.nix │ ├── discord-applemusic-rich-presence.nix │ └── xdg-open-svc.nix ├── overlay.nix ├── overlays └── default.nix └── pkgs ├── clone-org └── default.nix ├── diffnav └── default.nix ├── discord-applemusic-rich-presence └── default.nix ├── envdoc └── default.nix ├── fork-cleaner └── default.nix ├── glyphs └── default.nix ├── gocovsh └── default.nix ├── golangci-lint ├── default.nix └── update.sh ├── gopls ├── default.nix └── update.sh ├── issue-magic └── default.nix ├── jsonfmt └── default.nix ├── mdtree └── default.nix ├── misspell └── default.nix ├── mkdocs-git-revision-date-localized-plugin └── default.nix ├── mkdocs-include-markdown-plugin └── default.nix ├── org-stats └── default.nix ├── svu └── default.nix ├── timer └── default.nix └── xdg-open-svc └── default.nix /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: "Build and populate cache" 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | schedule: 9 | # rebuild everyday at 2:51 10 | # TIP: Choose a random time here so not all repositories are build at once: 11 | # https://www.random.org/clock-times/?num=1&earliest=01%3A00&latest=08%3A00&interval=5&format=html&rnd=new 12 | - cron: "51 2 * * *" 13 | jobs: 14 | tests: 15 | strategy: 16 | matrix: 17 | # Set this to notify the global nur package registry that changes are 18 | # available. 19 | # 20 | # The repo name as used in 21 | # https://github.com/nix-community/NUR/blob/master/repos.json 22 | nurRepo: 23 | - caarlos0 24 | # Set this to cache your build results in cachix for faster builds 25 | # in CI and for everyone who uses your cache. 26 | # 27 | # Format: Your cachix cache host name without the ".cachix.org" suffix. 28 | # Example: mycache (for mycache.cachix.org) 29 | # 30 | # For this to work, you also need to set the CACHIX_SIGNING_KEY or 31 | # CACHIX_AUTH_TOKEN secret in your repository secrets settings in 32 | # Github found at 33 | # https://github.com//nur-packages/settings/secrets 34 | cachixName: 35 | - caarlos0 36 | nixPath: 37 | - nixpkgs=channel:nixos-unstable 38 | - nixpkgs=channel:nixpkgs-unstable 39 | runs-on: ubuntu-latest 40 | steps: 41 | - name: Checkout repository 42 | uses: actions/checkout@v4 43 | - name: Install nix 44 | uses: cachix/install-nix-action@v30 45 | with: 46 | nix_path: "${{ matrix.nixPath }}" 47 | extra_nix_config: | 48 | experimental-features = nix-command flakes 49 | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 50 | - name: Show nixpkgs version 51 | run: nix-instantiate --eval -E '(import {}).lib.version' 52 | - name: Setup cachix 53 | uses: cachix/cachix-action@v15 54 | # Don't replace here! 55 | if: ${{ matrix.cachixName != '' }} 56 | with: 57 | name: ${{ matrix.cachixName }} 58 | signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" 59 | authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" 60 | - name: Check evaluation 61 | run: | 62 | nix-env -f . -qa \* --meta --xml \ 63 | --allowed-uris https://static.rust-lang.org \ 64 | --option restrict-eval true \ 65 | --option allow-import-from-derivation true \ 66 | --drv-path --show-trace \ 67 | -I nixpkgs=$(nix-instantiate --find-file nixpkgs) \ 68 | -I $PWD 69 | - name: Build nix packages 70 | run: nix shell -f '' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs 71 | - name: Trigger NUR update 72 | # Don't replace here! 73 | if: ${{ matrix.nurRepo != '' }} 74 | run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}" 75 | -------------------------------------------------------------------------------- /.github/workflows/bump.yml: -------------------------------------------------------------------------------- 1 | on: 2 | schedule: 3 | - cron: "0 0 * * *" 4 | workflow_dispatch: 5 | 6 | permissions: 7 | contents: write 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: cachix/install-nix-action@v30 16 | - run: ./pkgs/gopls/update.sh 17 | - run: ./pkgs/golangci-lint/update.sh 18 | - uses: stefanzweifel/git-auto-commit-action@v5 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | with: 22 | commit_message: "chore(nix): update" 23 | branch: master 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | result 2 | result-* 3 | 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Francesco Gazzetta 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nur-packages 2 | 3 | **My personal [NUR](https://github.com/nix-community/NUR) repository** 4 | 5 | 6 | 7 | ![Build and populate cache](https://github.com/caarlos0/nur/workflows/Build%20and%20populate%20cache/badge.svg) 8 | 9 | [![Cachix Cache](https://img.shields.io/badge/cachix-caarlos0-blue.svg)](https://caarlos0.cachix.org) 10 | -------------------------------------------------------------------------------- /ci.nix: -------------------------------------------------------------------------------- 1 | # This file provides all the buildable and cacheable packages and 2 | # package outputs in your package set. These are what gets built by CI, 3 | # so if you correctly mark packages as 4 | # 5 | # - broken (using `meta.broken`), 6 | # - unfree (using `meta.license.free`), and 7 | # - locally built (using `preferLocalBuild`) 8 | # 9 | # then your CI will be able to build and cache only those packages for 10 | # which this is possible. 11 | 12 | { pkgs ? import { } }: 13 | 14 | with builtins; 15 | let 16 | isReserved = n: n == "lib" || n == "overlays" || n == "modules"; 17 | isDerivation = p: isAttrs p && p ? type && p.type == "derivation"; 18 | isBuildable = p: !(p.meta.broken or false) && p.meta.license.free or true; 19 | isCacheable = p: !(p.preferLocalBuild or false); 20 | shouldRecurseForDerivations = p: isAttrs p && p.recurseForDerivations or false; 21 | 22 | nameValuePair = n: v: { name = n; value = v; }; 23 | 24 | concatMap = builtins.concatMap or (f: xs: concatLists (map f xs)); 25 | 26 | flattenPkgs = s: 27 | let 28 | f = p: 29 | if shouldRecurseForDerivations p then flattenPkgs p 30 | else if isDerivation p then [ p ] 31 | else [ ]; 32 | in 33 | concatMap f (attrValues s); 34 | 35 | outputsOf = p: map (o: p.${o}) p.outputs; 36 | 37 | nurAttrs = import ./default.nix { inherit pkgs; }; 38 | 39 | nurPkgs = 40 | flattenPkgs 41 | (listToAttrs 42 | (map (n: nameValuePair n nurAttrs.${n}) 43 | (filter (n: !isReserved n) 44 | (attrNames nurAttrs)))); 45 | 46 | in 47 | rec { 48 | buildPkgs = filter isBuildable nurPkgs; 49 | cachePkgs = filter isCacheable buildPkgs; 50 | 51 | buildOutputs = concatMap outputsOf buildPkgs; 52 | cacheOutputs = concatMap outputsOf cachePkgs; 53 | } 54 | -------------------------------------------------------------------------------- /debug.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caarlos0/nur/1fc9d9618d1a2177cb01358eb4503a02a6cb3721/debug.log -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | # This file describes your repository contents. 2 | # It should return a set of nix derivations 3 | # and optionally the special attributes `lib`, `modules` and `overlays`. 4 | # It should NOT import . Instead, you should take pkgs as an argument. 5 | # Having pkgs default to is fine though, and it lets you use short 6 | # commands such as: 7 | # nix-build -A mypackage 8 | 9 | { 10 | pkgs ? import { }, 11 | }: 12 | 13 | { 14 | # The `lib`, `modules`, and `overlay` names are special 15 | lib = import ./lib { inherit pkgs; }; # functions 16 | modules = import ./modules; # NixOS modules 17 | overlays = import ./overlays; # nixpkgs overlays 18 | 19 | clone-org = pkgs.callPackage ./pkgs/clone-org { }; 20 | discord-applemusic-rich-presence = pkgs.callPackage ./pkgs/discord-applemusic-rich-presence { }; 21 | envdoc = pkgs.callPackage ./pkgs/envdoc { }; 22 | fork-cleaner = pkgs.callPackage ./pkgs/fork-cleaner { }; 23 | glyphs = pkgs.callPackage ./pkgs/glyphs { }; 24 | gocovsh = pkgs.callPackage ./pkgs/gocovsh { }; 25 | golangci-lint = pkgs.callPackage ./pkgs/golangci-lint { }; 26 | gopls = pkgs.callPackage ./pkgs/gopls { }; 27 | jsonfmt = pkgs.callPackage ./pkgs/jsonfmt { }; 28 | mdtree = pkgs.callPackage ./pkgs/mdtree { }; 29 | misspell = pkgs.callPackage ./pkgs/misspell { }; 30 | org-stats = pkgs.callPackage ./pkgs/org-stats { }; 31 | svu = pkgs.callPackage ./pkgs/svu { }; 32 | timer = pkgs.callPackage ./pkgs/timer { }; 33 | xdg-open-svc = pkgs.callPackage ./pkgs/xdg-open-svc { }; 34 | diffnav = pkgs.callPackage ./pkgs/diffnav { }; 35 | 36 | mkdocs-include-markdown-plugin = pkgs.callPackage ./pkgs/mkdocs-include-markdown-plugin { }; 37 | mkdocs-git-revision-date-localized-plugin = 38 | pkgs.callPackage ./pkgs/mkdocs-git-revision-date-localized-plugin 39 | { }; 40 | } 41 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1732617236, 6 | "narHash": "sha256-PYkz6U0bSEaEB1al7O1XsqVNeSNS+s3NVclJw7YC43w=", 7 | "owner": "NixOS", 8 | "repo": "nixpkgs", 9 | "rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "NixOS", 14 | "ref": "nixpkgs-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs" 22 | } 23 | } 24 | }, 25 | "root": "root", 26 | "version": 7 27 | } 28 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "My personal NUR repository"; 3 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 4 | outputs = 5 | { self 6 | , nixpkgs 7 | , 8 | }: 9 | let 10 | systems = [ 11 | "x86_64-linux" 12 | "i686-linux" 13 | "x86_64-darwin" 14 | "aarch64-linux" 15 | "aarch64-darwin" 16 | "armv6l-linux" 17 | "armv7l-linux" 18 | ]; 19 | forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); 20 | in 21 | { 22 | packages = forAllSystems (system: 23 | import ./default.nix { 24 | pkgs = import nixpkgs { inherit system; }; 25 | }); 26 | homeManagerModules.default = import ./modules/hm; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /lib/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | 3 | with pkgs.lib; { 4 | # Add your library functions here 5 | # 6 | # hexint = x: hexvals.${toLower x}; 7 | } 8 | -------------------------------------------------------------------------------- /modules/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # Add your NixOS modules here 3 | # 4 | # my-module = ./my-module; 5 | } 6 | -------------------------------------------------------------------------------- /modules/hm/default.nix: -------------------------------------------------------------------------------- 1 | { imports = [ ./discord-applemusic-rich-presence.nix ./xdg-open-svc.nix ]; } 2 | -------------------------------------------------------------------------------- /modules/hm/discord-applemusic-rich-presence.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | with lib; 3 | let 4 | cfg = config.services.discord-applemusic-rich-presence; 5 | flakePkgs = import ../.. { inherit pkgs; }; 6 | in 7 | { 8 | options.services.discord-applemusic-rich-presence = { 9 | enable = mkEnableOption "discord-applemusic-rich-presence"; 10 | package = mkPackageOption flakePkgs "discord-applemusic-rich-presence" { }; 11 | logFile = mkOption { 12 | type = types.nullOr types.path; 13 | default = null; 14 | example = '' 15 | ${config.xdg.cacheHome}/discord-applemusic-rich-presence.log 16 | ''; 17 | description = '' 18 | Path to a file to log to. If not specified, no logging will be done. 19 | ''; 20 | }; 21 | }; 22 | 23 | config = mkMerge [ 24 | (mkIf cfg.enable { 25 | launchd.agents.discord-applemusic-rich-presence = { 26 | enable = true; 27 | config = { 28 | ProgramArguments = 29 | [ "${cfg.package}/bin/discord-applemusic-rich-presence" ]; 30 | KeepAlive = true; 31 | RunAtLoad = true; 32 | StandardOutPath = cfg.logFile; 33 | StandardErrorPath = cfg.logFile; 34 | }; 35 | }; 36 | }) 37 | ]; 38 | } 39 | -------------------------------------------------------------------------------- /modules/hm/xdg-open-svc.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, ... }: 2 | with lib; 3 | let 4 | cfg = config.services.xdg-open-svc; 5 | flakePkgs = import ../.. { inherit pkgs; }; 6 | in 7 | { 8 | options.services.xdg-open-svc = { 9 | enable = mkEnableOption "xdg-open-svc"; 10 | package = mkPackageOption flakePkgs "xdg-open-svc" { }; 11 | logFile = mkOption { 12 | type = types.nullOr types.path; 13 | default = null; 14 | example = '' 15 | ${config.xdg.cacheHome}/xdg-open-svc.log 16 | ''; 17 | description = '' 18 | Path to a file to log to. If not specified, no logging will be done. 19 | ''; 20 | }; 21 | }; 22 | 23 | config = mkMerge [ 24 | (mkIf cfg.enable { 25 | launchd.agents.xdg-open-svc = { 26 | enable = true; 27 | config = { 28 | ProgramArguments = [ "${cfg.package}/bin/xdg-open-svc" ]; 29 | KeepAlive = true; 30 | RunAtLoad = true; 31 | StandardOutPath = cfg.logFile; 32 | StandardErrorPath = cfg.logFile; 33 | }; 34 | }; 35 | }) 36 | ]; 37 | } 38 | -------------------------------------------------------------------------------- /overlay.nix: -------------------------------------------------------------------------------- 1 | # You can use this file as a nixpkgs overlay. This is useful in the 2 | # case where you don't want to add the whole NUR namespace to your 3 | # configuration. 4 | 5 | self: super: 6 | let 7 | isReserved = n: n == "lib" || n == "overlays" || n == "modules"; 8 | nameValuePair = n: v: { name = n; value = v; }; 9 | nurAttrs = import ./default.nix { pkgs = super; }; 10 | 11 | in 12 | builtins.listToAttrs 13 | (map (n: nameValuePair n nurAttrs.${n}) 14 | (builtins.filter (n: !isReserved n) 15 | (builtins.attrNames nurAttrs))) 16 | -------------------------------------------------------------------------------- /overlays/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # Add your overlays here 3 | # 4 | # my-overlay = import ./my-overlay; 5 | } 6 | -------------------------------------------------------------------------------- /pkgs/clone-org/default.nix: -------------------------------------------------------------------------------- 1 | # with import { }; 2 | { buildGoModule, fetchFromGitHub, lib, ... }: 3 | buildGoModule rec { 4 | pname = "clone-org"; 5 | version = "1.5.2"; 6 | 7 | src = fetchFromGitHub { 8 | owner = "caarlos0"; 9 | repo = "clone-org"; 10 | rev = "v${version}"; 11 | sha256 = "sha256-iYpCQOXvyd6ZDhInr3Jodrj2brU6lAR2K+L1z++i37E="; 12 | }; 13 | 14 | vendorHash = "sha256-B52WZ+ri2jIWN48c5lDz4NrjX8OInTeNLn6ZFn4sP70="; 15 | 16 | ldflags = 17 | [ "-s" "-w" "-X=main.version=${version}" "-X=main.builtBy=nixpkgs" ]; 18 | 19 | meta = with lib; { 20 | description = "Clone all repos of a github organization"; 21 | homepage = "https://github.com/caarlos0/clone-org"; 22 | license = licenses.mit; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /pkgs/diffnav/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , pkgs 3 | , buildGoModule 4 | , fetchFromGitHub 5 | , makeWrapper 6 | }: 7 | buildGoModule rec { 8 | pname = "diffnav"; 9 | version = "0.2.8"; 10 | 11 | src = fetchFromGitHub { 12 | owner = "dlvhdr"; 13 | repo = "diffnav"; 14 | rev = "v${version}"; 15 | hash = "sha256-xZAi/Ky1RjOxjhQKHvozaPTqDPcrGfhMemGWzi7WyW4="; 16 | }; 17 | 18 | vendorHash = "sha256-2JjQF+fwl8+Xoq9T3jCvngRAOa3935zpi9qbF4w4hEI="; 19 | 20 | postPatch = '' 21 | sed 's/1.22.6/1.22.5/' -i go.mod 22 | ''; 23 | 24 | nativeBuildInputs = [ makeWrapper ]; 25 | postFixup = '' 26 | wrapProgram $out/bin/diffnav \ 27 | --prefix PATH : ${lib.makeBinPath [ pkgs.delta ]} 28 | ''; 29 | 30 | doCheck = false; 31 | 32 | meta = with lib; { 33 | description = "A git diff pager based on delta but with a file tree, à la GitHub"; 34 | homepage = "https://github.com/dlvhdr/diffnav"; 35 | changelog = "https://github.com/dlvhdr/diffnav/commits"; 36 | maintainers = with maintainers; [ caarlos0 ]; 37 | mainProgram = "diffnav"; 38 | }; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /pkgs/discord-applemusic-rich-presence/default.nix: -------------------------------------------------------------------------------- 1 | { buildGoModule, fetchFromGitHub, lib, stdenv, ... }: 2 | buildGoModule rec { 3 | pname = "discord-applemusic-rich-presence"; 4 | version = "0.6.0"; 5 | 6 | src = fetchFromGitHub { 7 | owner = "caarlos0"; 8 | repo = "discord-applemusic-rich-presence"; 9 | rev = "v${version}"; 10 | sha256 = "sha256-d4p7AaezUPgBB2EUFjo0v/DWKWXMuiafj7kz16eIOeQ="; 11 | }; 12 | 13 | vendorHash = "sha256-RFJTBfsfEyKn9OSvE2HLgjKiJC3Hs90+P9rm5GlIseo="; 14 | 15 | ldflags = 16 | [ "-s" "-w" "-X=main.version=${version}" "-X=main.builtBy=nixpkgs" ]; 17 | 18 | meta = with lib; { 19 | description = "Discord's Rich Presence from Apple Music"; 20 | homepage = "https://github.com/caarlos0/discord-applemusic-rich-presence"; 21 | license = licenses.mit; 22 | platforms = platforms.darwin; 23 | broken = stdenv.isLinux; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /pkgs/envdoc/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildGoModule 3 | , fetchFromGitHub 4 | }: 5 | buildGoModule rec { 6 | pname = "envdoc"; 7 | version = "0.2.4"; 8 | 9 | src = fetchFromGitHub { 10 | owner = "g4s8"; 11 | repo = "envdoc"; 12 | rev = "v${version}"; 13 | hash = "sha256-oimI9sGfM8u2vmdmrLwAgwbTN5t9y3hCx2Fzh2gH/CE="; 14 | }; 15 | 16 | vendorHash = null; 17 | 18 | doCheck = false; 19 | 20 | meta = with lib; { 21 | description = "Go tool to generate documentation for environment variables"; 22 | homepage = "https://github.com/g4s8/envdoc"; 23 | changelog = "https://github.com/g4s8/envdoc/commits"; 24 | maintainers = with maintainers; [ caarlos0 ]; 25 | mainProgram = "envdoc"; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /pkgs/fork-cleaner/default.nix: -------------------------------------------------------------------------------- 1 | # This file was generated by GoReleaser. DO NOT EDIT. 2 | # vim: set ft=nix ts=2 sw=2 sts=2 et sta 3 | { system ? builtins.currentSystem, pkgs, lib, fetchurl, installShellFiles }: 4 | let 5 | shaMap = { 6 | x86_64-linux = "1dbajimg5ijqblz6v67wh7q4w1i495fr6y0qxplyxp8yqpr9xnjc"; 7 | aarch64-linux = "04zj77h42hkqa3fgj4w0ynkifcpahx6cp1l0zal6vl979668hg3a"; 8 | x86_64-darwin = "162qpfw8ya9amcjd5q7la73gh2hi78jlihgsw262zy60f653qpp5"; 9 | aarch64-darwin = "162qpfw8ya9amcjd5q7la73gh2hi78jlihgsw262zy60f653qpp5"; 10 | }; 11 | 12 | urlMap = { 13 | x86_64-linux = "https://github.com/caarlos0/fork-cleaner/releases/download/v2.3.0/fork-cleaner_2.3.0_linux_amd64.tar.gz"; 14 | aarch64-linux = "https://github.com/caarlos0/fork-cleaner/releases/download/v2.3.0/fork-cleaner_2.3.0_linux_arm64.tar.gz"; 15 | x86_64-darwin = "https://github.com/caarlos0/fork-cleaner/releases/download/v2.3.0/fork-cleaner_2.3.0_darwin_all.tar.gz"; 16 | aarch64-darwin = "https://github.com/caarlos0/fork-cleaner/releases/download/v2.3.0/fork-cleaner_2.3.0_darwin_all.tar.gz"; 17 | }; 18 | in pkgs.stdenv.mkDerivation { 19 | pname = "fork-cleaner"; 20 | version = "2.3.0"; 21 | src = fetchurl { 22 | url = urlMap.${system}; 23 | sha256 = shaMap.${system}; 24 | }; 25 | 26 | sourceRoot = "."; 27 | 28 | nativeBuildInputs = [ installShellFiles ]; 29 | 30 | installPhase = '' 31 | mkdir -p $out/bin 32 | cp -vr ./fork-cleaner $out/bin/fork-cleaner 33 | ''; 34 | 35 | system = system; 36 | 37 | meta = with lib; { 38 | description = "Cleans up old and inactive forks on your github account."; 39 | homepage = "https://github.com/caarlos0/fork-cleaner"; 40 | license = licenses.mit; 41 | 42 | platforms = [ 43 | "aarch64-darwin" 44 | "aarch64-linux" 45 | "x86_64-darwin" 46 | "x86_64-linux" 47 | ]; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /pkgs/glyphs/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildGoModule 3 | , fetchFromGitHub 4 | }: 5 | buildGoModule { 6 | pname = "glyphs"; 7 | version = "2024-02-08"; 8 | 9 | src = fetchFromGitHub { 10 | owner = "maaslalani"; 11 | repo = "glyphs"; 12 | rev = "b51340f85d9323ed214b55135c939f59934af90a"; 13 | hash = "sha256-HRfjEka6kl29tWf3zUZzOsdHb3+6zfhF6eq5gknn6ys="; 14 | }; 15 | 16 | vendorHash = "sha256-R1M74SGmooHIsFUkqF4Vj52znKDsXyezrmL9o3fBDws="; 17 | 18 | doCheck = false; 19 | 20 | meta = with lib; { 21 | description = "Unicode symbols on the command line"; 22 | homepage = "https://github.com/maaslalani/glyphs"; 23 | changelog = "https://github.com/maaslalani/glyphs/commits"; 24 | maintainers = with maintainers; [ caarlos0 ]; 25 | mainProgram = "glyphs"; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /pkgs/gocovsh/default.nix: -------------------------------------------------------------------------------- 1 | # with import { }; 2 | { buildGoModule, fetchFromGitHub, lib, ... }: 3 | buildGoModule rec { 4 | pname = "gocovsh"; 5 | version = "0.6.1"; 6 | 7 | src = fetchFromGitHub { 8 | owner = "orlangure"; 9 | repo = "gocovsh"; 10 | rev = "v${version}"; 11 | sha256 = "sha256-VZNu1uecFVVDgF4xDLTgkCahUWbM+1XASV02PEUfmr0="; 12 | }; 13 | 14 | vendorHash = "sha256-Fb7BIWojOSUIlBdjIt57CSvF1a+x33sB45Z0a86JMUg="; 15 | 16 | ldflags = 17 | [ "-s" "-w" "-X=main.version=${version}" "-X=main.builtBy=nixpkgs" ]; 18 | 19 | meta = with lib; { 20 | description = 21 | "Go Coverage in your terminal: a tool for exploring Go Coverage reports from the command line"; 22 | homepage = "https://github.com/orlangure/gocovsh"; 23 | license = licenses.gpl3; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /pkgs/golangci-lint/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | buildGo124Module, 3 | fetchFromGitHub, 4 | lib, 5 | installShellFiles, 6 | }: 7 | 8 | buildGo124Module rec { 9 | pname = "golangci-lint"; 10 | version = "2.1.6"; 11 | 12 | src = fetchFromGitHub { 13 | owner = "golangci"; 14 | repo = "golangci-lint"; 15 | rev = "v${version}"; 16 | hash = "sha256-L0TsVOUSU+nfxXyWsFLe+eU4ZxWbW3bHByQVatsTpXA="; 17 | }; 18 | 19 | vendorHash = "sha256-tYoAUumnHgA8Al3jKjS8P/ZkUlfbmmmBcJYUR7+5u9w="; 20 | 21 | subPackages = [ "cmd/golangci-lint" ]; 22 | 23 | nativeBuildInputs = [ installShellFiles ]; 24 | 25 | ldflags = [ 26 | "-s" 27 | "-X main.version=${version}" 28 | "-X main.commit=v${version}" 29 | "-X main.date=19700101-00:00:00" 30 | ]; 31 | 32 | postInstall = '' 33 | for shell in bash zsh fish; do 34 | HOME=$TMPDIR $out/bin/golangci-lint completion $shell > golangci-lint.$shell 35 | installShellCompletion golangci-lint.$shell 36 | done 37 | ''; 38 | 39 | meta = with lib; { 40 | description = "Fast linters Runner for Go"; 41 | homepage = "https://golangci-lint.run/"; 42 | changelog = "https://github.com/golangci/golangci-lint/blob/v${version}/CHANGELOG.md"; 43 | mainProgram = "golangci-lint"; 44 | license = licenses.gpl3Plus; 45 | maintainers = with maintainers; [ 46 | SuperSandro2000 47 | mic92 48 | ]; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /pkgs/golangci-lint/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | wget -O ./pkgs/golangci-lint/default.nix https://raw.githubusercontent.com/NixOS/nixpkgs/refs/heads/master/pkgs/by-name/go/golangci-lint/package.nix 3 | # nix-build -A golangci-lint 4 | -------------------------------------------------------------------------------- /pkgs/gopls/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | buildGoModule, 4 | fetchFromGitHub, 5 | nix-update-script, 6 | versionCheckHook, 7 | }: 8 | 9 | buildGoModule (finalAttrs: { 10 | pname = "gopls"; 11 | version = "0.18.1"; 12 | 13 | src = fetchFromGitHub { 14 | owner = "golang"; 15 | repo = "tools"; 16 | tag = "gopls/v${finalAttrs.version}"; 17 | hash = "sha256-5w6R3kaYwrZyhIYjwLqfflboXT/z3HVpZiowxeUyaWg="; 18 | }; 19 | 20 | modRoot = "gopls"; 21 | vendorHash = "sha256-/tca93Df90/8K1dqhOfUsWSuFoNfg9wdWy3csOtFs6Y="; 22 | 23 | # https://github.com/golang/tools/blob/9ed98faa/gopls/main.go#L27-L30 24 | ldflags = [ "-X main.version=v${finalAttrs.version}" ]; 25 | 26 | doCheck = false; 27 | 28 | # Only build gopls, gofix, modernize, and not the integration tests or documentation generator. 29 | subPackages = [ 30 | "." 31 | "internal/analysis/gofix/cmd/gofix" 32 | "internal/analysis/modernize/cmd/modernize" 33 | ]; 34 | 35 | doInstallCheck = true; 36 | nativeInstallCheckInputs = [ versionCheckHook ]; 37 | versionCheckProgramArg = "version"; 38 | 39 | passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=gopls/(.*)" ]; }; 40 | 41 | meta = { 42 | changelog = "https://github.com/golang/tools/releases/tag/gopls/v${finalAttrs.version}"; 43 | description = "Official language server for the Go language"; 44 | homepage = "https://github.com/golang/tools/tree/master/gopls"; 45 | license = lib.licenses.bsd3; 46 | maintainers = with lib.maintainers; [ 47 | mic92 48 | rski 49 | SuperSandro2000 50 | zimbatm 51 | ]; 52 | mainProgram = "gopls"; 53 | }; 54 | }) 55 | -------------------------------------------------------------------------------- /pkgs/gopls/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | wget -O ./pkgs/gopls/default.nix https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/by-name/go/gopls/package.nix 3 | # nix-build -A gopls 4 | -------------------------------------------------------------------------------- /pkgs/issue-magic/default.nix: -------------------------------------------------------------------------------- 1 | # This file was generated by GoReleaser. DO NOT EDIT. 2 | # vim: set ft=nix ts=2 sw=2 sts=2 et sta 3 | { 4 | system ? builtins.currentSystem 5 | , lib 6 | , fetchurl 7 | , installShellFiles 8 | , stdenvNoCC 9 | }: 10 | let 11 | shaMap = { 12 | aarch64-linux = "0p6v468wk3f9d8jbsg7x3y3mjcxgiag8j28pblhrdd68il57a466"; 13 | x86_64-darwin = "0bxp9ykbv9ffz2blczx2fw88y1bchmx4zzgxxd1nl2mi8cphg7r5"; 14 | aarch64-darwin = "0bxp9ykbv9ffz2blczx2fw88y1bchmx4zzgxxd1nl2mi8cphg7r5"; 15 | }; 16 | 17 | urlMap = { 18 | aarch64-linux = "https://github.com/caarlos0/issue-magic/releases/download/v0.0.1/issue-magic_Linux_arm64.tar.gz"; 19 | x86_64-darwin = "https://github.com/caarlos0/issue-magic/releases/download/v0.0.1/issue-magic_Darwin_all.tar.gz"; 20 | aarch64-darwin = "https://github.com/caarlos0/issue-magic/releases/download/v0.0.1/issue-magic_Darwin_all.tar.gz"; 21 | }; 22 | in 23 | stdenvNoCC.mkDerivation { 24 | pname = "issue-magic"; 25 | version = "0.0.1"; 26 | src = fetchurl { 27 | url = urlMap.${system}; 28 | sha256 = shaMap.${system}; 29 | }; 30 | 31 | sourceRoot = "."; 32 | 33 | nativeBuildInputs = [ installShellFiles ]; 34 | 35 | installPhase = '' 36 | mkdir -p $out/bin 37 | cp -vr ./issue-magic $out/bin/issue-magic 38 | ''; 39 | 40 | system = system; 41 | 42 | meta = { 43 | description = "Auto-label GitHub issues"; 44 | homepage = "https://github.com/caarlos0/issue-magic"; 45 | license = lib.licenses.mit; 46 | 47 | sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 48 | 49 | platforms = [ 50 | "aarch64-darwin" 51 | "aarch64-linux" 52 | "x86_64-darwin" 53 | ]; 54 | }; 55 | } 56 | -------------------------------------------------------------------------------- /pkgs/jsonfmt/default.nix: -------------------------------------------------------------------------------- 1 | { buildGoModule, fetchFromGitHub, lib, ... }: 2 | buildGoModule rec { 3 | pname = "jsonfmt"; 4 | version = "0.5.0"; 5 | 6 | src = fetchFromGitHub { 7 | owner = "caarlos0"; 8 | repo = "jsonfmt"; 9 | rev = "v${version}"; 10 | sha256 = "rVv7Dv4vQmss4eiiy+KaO9tZ5U58WlRlsOz4QO0gdfM="; 11 | }; 12 | 13 | vendorHash = "sha256-xtwN+TemiiyXOxZ2DNys4G6w4KA3BjLSWAmzox+boMY="; 14 | 15 | ldflags = 16 | [ "-s" "-w" "-X=main.version=${version}" "-X=main.builtBy=nixpkgs" ]; 17 | 18 | meta = with lib; { 19 | description = "Like gofmt, but for JSON files"; 20 | homepage = "https://github.com/caarlos0/jsonfmt"; 21 | license = licenses.mit; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /pkgs/mdtree/default.nix: -------------------------------------------------------------------------------- 1 | # This file was generated by GoReleaser. DO NOT EDIT. 2 | # vim: set ft=nix ts=2 sw=2 sts=2 et sta 3 | { 4 | system ? builtins.currentSystem 5 | , lib 6 | , fetchurl 7 | , installShellFiles 8 | , stdenvNoCC 9 | }: 10 | let 11 | shaMap = { 12 | x86_64-linux = "1ra4g8grhwv7b7qh6gr16k6lns6yhv2nfx2lgaybdk85jfl6mlnh"; 13 | aarch64-linux = "1jjn9jwvc4vhz7nrq684icfb04yi56ayw3sf1dbbjd3wagqd83jf"; 14 | x86_64-darwin = "07skds1lcnkickhmvif0n54kjxjym9z8bdsikmg7svafg04f6x29"; 15 | aarch64-darwin = "07skds1lcnkickhmvif0n54kjxjym9z8bdsikmg7svafg04f6x29"; 16 | }; 17 | 18 | urlMap = { 19 | x86_64-linux = "https://github.com/caarlos0/mdtree/releases/download/v0.1.0/mdtree_0.1.0_linux_amd64.tar.gz"; 20 | aarch64-linux = "https://github.com/caarlos0/mdtree/releases/download/v0.1.0/mdtree_0.1.0_linux_arm64.tar.gz"; 21 | x86_64-darwin = "https://github.com/caarlos0/mdtree/releases/download/v0.1.0/mdtree_0.1.0_darwin_all.tar.gz"; 22 | aarch64-darwin = "https://github.com/caarlos0/mdtree/releases/download/v0.1.0/mdtree_0.1.0_darwin_all.tar.gz"; 23 | }; 24 | in 25 | stdenvNoCC.mkDerivation { 26 | pname = "mdtree"; 27 | version = "0.1.0"; 28 | src = fetchurl { 29 | url = urlMap.${system}; 30 | sha256 = shaMap.${system}; 31 | }; 32 | 33 | sourceRoot = "."; 34 | 35 | nativeBuildInputs = [ installShellFiles ]; 36 | 37 | installPhase = '' 38 | mkdir -p $out/bin 39 | cp -vr ./mdtree $out/bin/mdtree 40 | ''; 41 | 42 | system = system; 43 | 44 | meta = { 45 | description = "Convert markdown lists into beautiful ASCII trees"; 46 | homepage = "https://github.com/caarlos0/mdtree"; 47 | license = lib.licenses.mit; 48 | 49 | sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 50 | 51 | platforms = [ 52 | "aarch64-darwin" 53 | "aarch64-linux" 54 | "x86_64-darwin" 55 | "x86_64-linux" 56 | ]; 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /pkgs/misspell/default.nix: -------------------------------------------------------------------------------- 1 | with import { }; 2 | { lib 3 | , buildGoModule 4 | , fetchFromGitHub 5 | }: 6 | buildGoModule { 7 | pname = "misspell"; 8 | version = "v0.4.1"; 9 | 10 | src = fetchFromGitHub { 11 | owner = "golangci"; 12 | repo = "misspell"; 13 | rev = "v0.4.1"; 14 | hash = "sha256-J9M0sCLz3J1XJWq6dP+n1nkMbaQyNBlqS7tSY1WsCAk="; 15 | }; 16 | 17 | vendorHash = "sha256-qf787Dg6Xy3HGkgroATQ+Xd15muLpkVDuzFskBktEXo="; 18 | 19 | doCheck = false; 20 | 21 | meta = with lib; { 22 | description = "Correct commonly misspelled English words in source files"; 23 | homepage = "https://github.com/golangci/misspell"; 24 | changelog = "https://github.com/golangci/misspell/commits"; 25 | maintainers = with maintainers; [ caarlos0 ]; 26 | mainProgram = "misspell"; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /pkgs/mkdocs-git-revision-date-localized-plugin/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | python3, 4 | fetchFromGitHub, 5 | }: 6 | 7 | python3.pkgs.buildPythonPackage rec { 8 | pname = "mkdocs-git-revision-date-localized-plugin"; 9 | version = "1.3.0"; 10 | pyproject = true; 11 | 12 | src = fetchFromGitHub { 13 | owner = "timvink"; 14 | repo = "mkdocs-git-revision-date-localized-plugin"; 15 | rev = "refs/tags/v${version}"; 16 | hash = "sha256-Z0a/V8wyo15E7bTumLRM+0QxMGXlxVc1Sx9uXlDbg+8="; 17 | }; 18 | 19 | build-system = with python3.pkgs; [ setuptools ]; 20 | 21 | nativeBuildInputs = [ python3.pkgs.setuptools-scm ]; 22 | 23 | propagatedBuildInputs = with python3.pkgs; [ 24 | babel 25 | gitpython 26 | mkdocs 27 | pytz 28 | ]; 29 | 30 | nativeCheckInputs = [ python3.pkgs.pytestCheckHook ]; 31 | 32 | disabledTestPaths = [ "tests/test_builds.py" ]; 33 | 34 | pythonImportsCheck = [ "mkdocs_git_revision_date_localized_plugin" ]; 35 | 36 | meta = with lib; { 37 | description = "MkDocs plugin that enables displaying the date of the last git modification of a page"; 38 | homepage = "https://github.com/timvink/mkdocs-git-revision-date-localized-plugin"; 39 | changelog = "https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases/tag/v${version}"; 40 | license = licenses.mit; 41 | maintainers = with maintainers; [ totoroot ]; 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /pkgs/mkdocs-include-markdown-plugin/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , python3 3 | , fetchPypi 4 | }: 5 | 6 | python3.pkgs.buildPythonPackage rec { 7 | pname = "mkdocs-include-markdown-plugin"; 8 | version = "6.2.2"; 9 | format = "wheel"; 10 | 11 | src = fetchPypi rec { 12 | inherit version format; 13 | pname = "mkdocs_include_markdown_plugin"; 14 | hash = "sha256-0pOVD2SZ0pRCkcp7m8SmDmUrv9PjpCtWT2zO7iaGlOc="; 15 | dist = python; 16 | python = "py3"; 17 | }; 18 | 19 | propagatedBuildInputs = [ python3.pkgs.wcmatch ]; 20 | 21 | meta = with lib; { 22 | description = "Mkdocs Markdown includer plugin"; 23 | homepage = "https://github.com/mondeja/mkdocs-include-markdown-plugin"; 24 | license = licenses.asl20; 25 | maintainers = with maintainers; [ caarlos0 ]; 26 | changelog = "https://github.com/mondeja/mkdocs-include-markdown-plugin/releases/tag/v${version}"; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /pkgs/org-stats/default.nix: -------------------------------------------------------------------------------- 1 | { buildGoModule, fetchFromGitHub, lib, ... }: 2 | buildGoModule rec { 3 | pname = "org-stats"; 4 | version = "1.11.2"; 5 | 6 | src = fetchFromGitHub { 7 | owner = "caarlos0"; 8 | repo = "org-stats"; 9 | rev = "v${version}"; 10 | sha256 = "sha256-b0Cfs4EqQOft/HNAoJvRriCMzNiOgYagBLiPYgsDgJM="; 11 | }; 12 | 13 | vendorHash = "sha256-LKpnEXVfxBR3cebv46QontDVeA64MJe0vNiKSnTjLtQ="; 14 | 15 | meta = with lib; { 16 | description = 17 | "Get the contributor stats summary from all repos of any given organization"; 18 | homepage = "https://github.com/caarlos0/org-stats"; 19 | license = licenses.mit; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /pkgs/svu/default.nix: -------------------------------------------------------------------------------- 1 | # This file was generated by GoReleaser. DO NOT EDIT. 2 | # vim: set ft=nix ts=2 sw=2 sts=2 et sta 3 | { 4 | system ? builtins.currentSystem 5 | , lib 6 | , fetchurl 7 | , installShellFiles 8 | , stdenvNoCC 9 | }: 10 | let 11 | shaMap = { 12 | x86_64-linux = "00jc8ywbcpaj7ikb65n5k92n46iag3jl5qmqxw9a55sxk8mxn295"; 13 | aarch64-linux = "0ax7i9424cnz9asv8ssm97kvijyfq7843ck8q5wqr44kd13rsj15"; 14 | x86_64-darwin = "0illbj25nivjlx90sayl5yvwnn3rfpqwzk4cl9yns6mf1qmd8qiy"; 15 | aarch64-darwin = "0illbj25nivjlx90sayl5yvwnn3rfpqwzk4cl9yns6mf1qmd8qiy"; 16 | }; 17 | 18 | urlMap = { 19 | x86_64-linux = "https://github.com/caarlos0/svu/releases/download/v3.2.3/svu_3.2.3_linux_amd64.tar.gz"; 20 | aarch64-linux = "https://github.com/caarlos0/svu/releases/download/v3.2.3/svu_3.2.3_linux_arm64.tar.gz"; 21 | x86_64-darwin = "https://github.com/caarlos0/svu/releases/download/v3.2.3/svu_3.2.3_darwin_all.tar.gz"; 22 | aarch64-darwin = "https://github.com/caarlos0/svu/releases/download/v3.2.3/svu_3.2.3_darwin_all.tar.gz"; 23 | }; 24 | in 25 | stdenvNoCC.mkDerivation { 26 | pname = "svu"; 27 | version = "3.2.3"; 28 | src = fetchurl { 29 | url = urlMap.${system}; 30 | sha256 = shaMap.${system}; 31 | }; 32 | 33 | sourceRoot = "."; 34 | 35 | nativeBuildInputs = [ installShellFiles ]; 36 | 37 | installPhase = '' 38 | mkdir -p $out/bin 39 | cp -vr ./svu $out/bin/svu 40 | installShellCompletion ./completions/* 41 | ''; 42 | 43 | system = system; 44 | 45 | meta = { 46 | description = "Semantic Version Utility"; 47 | homepage = "https://github.com/caarlos0/svu"; 48 | license = lib.licenses.mit; 49 | 50 | sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 51 | 52 | platforms = [ 53 | "aarch64-darwin" 54 | "aarch64-linux" 55 | "x86_64-darwin" 56 | "x86_64-linux" 57 | ]; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /pkgs/timer/default.nix: -------------------------------------------------------------------------------- 1 | # This file was generated by GoReleaser. DO NOT EDIT. 2 | # vim: set ft=nix ts=2 sw=2 sts=2 et sta 3 | { 4 | system ? builtins.currentSystem 5 | , lib 6 | , fetchurl 7 | , installShellFiles 8 | , stdenvNoCC 9 | }: 10 | let 11 | shaMap = { 12 | x86_64-linux = "15v5sj38xps5192n8hqfff7l56s2430z2qrkkfpkfhwsvkhfb811"; 13 | aarch64-linux = "089i9iippp0f3lhg0c95alx9b7nbpp2gw1byx802475hp5mz4ri6"; 14 | x86_64-darwin = "0nckyna3qpd7kvcd8ndw706z3anaz6cf0gylhfiafjba73phhcyz"; 15 | aarch64-darwin = "0nckyna3qpd7kvcd8ndw706z3anaz6cf0gylhfiafjba73phhcyz"; 16 | }; 17 | 18 | urlMap = { 19 | x86_64-linux = "https://github.com/caarlos0/timer/releases/download/v1.4.6/timer_linux_amd64.tar.gz"; 20 | aarch64-linux = "https://github.com/caarlos0/timer/releases/download/v1.4.6/timer_linux_arm64.tar.gz"; 21 | x86_64-darwin = "https://github.com/caarlos0/timer/releases/download/v1.4.6/timer_darwin_all.tar.gz"; 22 | aarch64-darwin = "https://github.com/caarlos0/timer/releases/download/v1.4.6/timer_darwin_all.tar.gz"; 23 | }; 24 | in 25 | stdenvNoCC.mkDerivation { 26 | pname = "timer"; 27 | version = "1.4.6"; 28 | src = fetchurl { 29 | url = urlMap.${system}; 30 | sha256 = shaMap.${system}; 31 | }; 32 | 33 | sourceRoot = "."; 34 | 35 | nativeBuildInputs = [ installShellFiles ]; 36 | 37 | installPhase = '' 38 | mkdir -p $out/bin 39 | cp -vr ./timer $out/bin/timer 40 | installShellCompletion ./completions/* 41 | installManPage ./manpages/timer.1.gz 42 | ''; 43 | 44 | system = system; 45 | 46 | meta = { 47 | description = "Timer is like sleep, but reports progress."; 48 | homepage = "https://github.com/caarlos0/timer"; 49 | license = lib.licenses.mit; 50 | 51 | sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 52 | 53 | platforms = [ 54 | "aarch64-darwin" 55 | "aarch64-linux" 56 | "x86_64-darwin" 57 | "x86_64-linux" 58 | ]; 59 | }; 60 | } 61 | -------------------------------------------------------------------------------- /pkgs/xdg-open-svc/default.nix: -------------------------------------------------------------------------------- 1 | # with import { }; 2 | { buildGoModule, fetchFromGitHub, lib, ... }: 3 | buildGoModule rec { 4 | pname = "xdg-open-svc"; 5 | version = "0.1.1"; 6 | 7 | src = fetchFromGitHub { 8 | owner = "caarlos0"; 9 | repo = "xdg-open-svc"; 10 | rev = "v${version}"; 11 | sha256 = "sha256-x6A6Fa2IRJKw9uAF7CmVbj4q8+LScaVnXPJ79fSBjY8="; 12 | }; 13 | 14 | vendorHash = "sha256-qaHsTivC4hgdznEWSKQWKmGEkmeKwIz+0h1PIzYVVm8="; 15 | 16 | ldflags = 17 | [ "-s" "-w" "-X=main.version=${version}" "-X=main.builtBy=nixpkgs" ]; 18 | 19 | meta = with lib; { 20 | description = "xdg-open as a service"; 21 | homepage = "https://github.com/caarlos0/xdg-open-svc"; 22 | license = licenses.mit; 23 | }; 24 | } 25 | --------------------------------------------------------------------------------