Unverified Commit 13b86b9a authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 37c785f3 cc9d3a57
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -273,6 +273,8 @@ To test that it works, you can then try using the gem with:
NIX_PATH=nixpkgs=$PWD nix-shell -p "ruby.withPackages (ps: with ps; [ name-of-your-gem ])"
```

To check the gems for any security vulnerabilities, run `./maintainers/scripts/audit-ruby-packages/audit-ruby-packages.bash`.

### Packaging applications {#packaging-applications}

A common task is to add a Ruby executable to Nixpkgs; popular examples would be `chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp` function, that allows you to make a package that only exposes the listed executables. Otherwise, the package may cause conflicts through common paths like `bin/rake` or `bin/bundler` that aren't meant to be used.
+6 −0
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bundler-audit

set -o errexit -o nounset -o pipefail

bundle-audit check "$(nix-build --no-out-link maintainers/scripts/audit-ruby-packages/default.nix)"
+15 −0
Original line number Diff line number Diff line
let
  pkgs = import ../../.. { };
  lockFileBody = pkgs.lib.concatStringsSep "\n" (
    pkgs.lib.mapAttrsToList (name: props: "    ${name} (${props.version})") (
      pkgs.lib.filterAttrs (name: _props: name != "recurseForDerivations") pkgs.rubyPackages
    )
  );
in
pkgs.runCommand "bundle-audit" { } ''
  mkdir "$out"
  echo 'GEM' > "$out/Gemfile.lock"
  echo '  remote: https://rubygems.org/' >> "$out/Gemfile.lock"
  echo '  specs:' >> "$out/Gemfile.lock"
  echo '${lockFileBody}' >> "$out/Gemfile.lock"
''
+13 −0
Original line number Diff line number Diff line
@@ -2467,6 +2467,19 @@ final: prev: {
    meta.hydraPlatforms = [ ];
  };
  cmp-dotenv = buildVimPlugin {
    pname = "cmp-dotenv";
    version = "2024-06-05";
    src = fetchFromGitHub {
      owner = "SergioRibera";
      repo = "cmp-dotenv";
      rev = "4dd53aab60982f1f75848aec5e6214986263325e";
      sha256 = "0pkkxfwsmp2rn77x8jbsb1j0avjx813n5kp4q6f0v0rfmjxk538i";
    };
    meta.homepage = "https://github.com/SergioRibera/cmp-dotenv/";
    meta.hydraPlatforms = [ ];
  };
  cmp-emoji = buildVimPlugin {
    pname = "cmp-emoji";
    version = "2024-03-19";
+4 −0
Original line number Diff line number Diff line
@@ -503,6 +503,10 @@ assertNoAdditions {
    checkInputs = [ self.nvim-cmp ];
  };

  cmp-dotenv = super.cmp-dotenv.overrideAttrs {
    checkInputs = [ self.nvim-cmp ];
  };

  cmp-fish = super.cmp-fish.overrideAttrs {
    checkInputs = [ self.nvim-cmp ];
  };
Loading