Skip to content

Commit 5ba00a1

Browse files
authored
invidious: format, clean derivation (#356256)
2 parents 6223faa + 6e266cd commit 5ba00a1

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

pkgs/by-name/in/invidious/package.nix

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
{ lib
2-
, callPackage
3-
, crystal
4-
, fetchFromGitHub
5-
, librsvg
6-
, pkg-config
7-
, libxml2
8-
, openssl
9-
, shards
10-
, sqlite
11-
, nixosTests
1+
{
2+
lib,
3+
callPackage,
4+
crystal,
5+
fetchFromGitHub,
6+
librsvg,
7+
pkg-config,
8+
libxml2,
9+
openssl,
10+
shards,
11+
sqlite,
12+
nixosTests,
1213

1314
# All versions, revisions, and checksums are stored in ./versions.json.
1415
# The update process is the following:
@@ -19,7 +20,7 @@
1920
# but nix's sandboxing does not allow that)
2021
# * if shard.lock changed
2122
# * recreate shards.nix by running crystal2nix
22-
, versions ? lib.importJSON ./versions.json
23+
versions ? lib.importJSON ./versions.json,
2324
}:
2425
let
2526
# normally video.js is downloaded at build time
@@ -33,7 +34,7 @@ crystal.buildCrystalPackage rec {
3334
owner = "iv-org";
3435
repo = "invidious";
3536
fetchSubmodules = true;
36-
rev = versions.invidious.rev or "v${version}";
37+
rev = versions.invidious.rev or "refs/tags/v${version}";
3738
inherit (versions.invidious) hash;
3839
};
3940

@@ -75,8 +76,15 @@ crystal.buildCrystalPackage rec {
7576
--replace-fail 'Process.run(%(rsvg-convert' 'Process.run(%(${lib.getBin librsvg}/bin/rsvg-convert'
7677
'';
7778

78-
nativeBuildInputs = [ pkg-config shards ];
79-
buildInputs = [ libxml2 openssl sqlite ];
79+
nativeBuildInputs = [
80+
pkg-config
81+
shards
82+
];
83+
buildInputs = [
84+
libxml2
85+
openssl
86+
sqlite
87+
];
8088

8189
format = "crystal";
8290
shardsFile = ./shards.nix;
@@ -114,16 +122,18 @@ crystal.buildCrystalPackage rec {
114122
'';
115123

116124
passthru = {
117-
tests = { inherit (nixosTests) invidious; };
125+
tests = {
126+
inherit (nixosTests) invidious;
127+
};
118128
updateScript = ./update.sh;
119129
};
120130

121-
meta = with lib; {
131+
meta = {
122132
description = "Open source alternative front-end to YouTube";
123133
mainProgram = "invidious";
124134
homepage = "https://invidious.io/";
125-
license = licenses.agpl3Plus;
126-
maintainers = with maintainers; [
135+
license = lib.licenses.agpl3Plus;
136+
maintainers = with lib.maintainers; [
127137
_999eagle
128138
GaetanLepage
129139
sbruder

0 commit comments

Comments
 (0)