aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-22 16:56:10 -0300
committerEuAndreh <eu@euandre.org>2023-03-22 16:56:10 -0300
commit673226a47f5ebe6f3083c449dd005589f2769a0b (patch)
tree7c600ce1f9abb71c368edcbc1804a4a58b26f6b7
parentSupport Homebrew (diff)
downloadpackage-repository-673226a47f5ebe6f3083c449dd005589f2769a0b.tar.gz
package-repository-673226a47f5ebe6f3083c449dd005589f2769a0b.tar.xz
Remove redundant "-latest" variants of packages in Guix and Nix
Diffstat (limited to '')
-rw-r--r--default.nix6
-rwxr-xr-xsrc/bin/paku32
-rw-r--r--src/org/euandre/packages.scm24
3 files changed, 15 insertions, 47 deletions
diff --git a/default.nix b/default.nix
index 54dd0ff..c406b44 100644
--- a/default.nix
+++ b/default.nix
@@ -105,8 +105,7 @@ self: super: {
platforms = platforms.unix;
};
};
- td = td-latest;
- td-latest = pkgs.stdenv.mkDerivation rec {
+ td = pkgs.stdenv.mkDerivation rec {
name = "td";
version = "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8";
@@ -142,8 +141,7 @@ self: super: {
platforms = platforms.unix;
};
};
- guile-heredoc = guile-heredoc-latest;
- guile-heredoc-latest = pkgs.stdenv.mkDerivation rec {
+ guile-heredoc = pkgs.stdenv.mkDerivation rec {
name = "guile-heredoc";
version = "065435cdce609604e33b879b9be3e81ab89f3e7b";
diff --git a/src/bin/paku b/src/bin/paku
index 55372b6..94f8d38 100755
--- a/src/bin/paku
+++ b/src/bin/paku
@@ -172,17 +172,12 @@ sub emit_nix() {
$ns = rec {
EOF
for my $pkg (@{$json->{packages}}) {
- if ($pkg->{label} eq 'latest') {
- print <<~EOF;
- $pkg->{name} = $pkg->{name}-latest;
- EOF
- }
-
my $long = $pkg->{'long-description'};
$long =~ s/^(.)/ $1/gm;
+ my $suffix = $pkg->{label} eq 'latest' ? '' : "-$pkg->{label}";
print <<~EOF;
- $pkg->{name}-$pkg->{label} = pkgs.stdenv.mkDerivation rec {
+ $pkg->{name}$suffix = pkgs.stdenv.mkDerivation rec {
name = "$pkg->{name}";
version = "$pkg->{version}";
@@ -261,18 +256,17 @@ sub emit_guix() {
my @pkgs = ();
for my $pkg (@{$json->{packages}}) {
- if ($pkg->{label} eq 'latest') {
- push @pkgs, "$pkg->{name}";
- }
-
my $long = $pkg->{'long-description'};
$long =~ s/^(.)/ $1/gm;
- push @pkgs, "$pkg->{name}-$pkg->{label}";
+ my $name = $pkg->{name} . (
+ $pkg->{label} eq 'latest' ? '' : "-$pkg->{label}"
+ );
+ push @pkgs, $name;
print <<~EOF;
- (define-public $pkg->{name}-$pkg->{label}
+ (define-public $name
(package
- (name "$pkg->{name}-$pkg->{label}")
+ (name "$name")
(version "$pkg->{version}")
(source
(origin
@@ -313,16 +307,6 @@ sub emit_guix() {
(license licenses:agpl3+)))
EOF
- if ($pkg->{type} eq 'latest') {
- print <<~EOF;
- (define-public $pkg->{name}
- (package
- (inherit $pkg->{name}-latest)
- (name "$pkg->{name}")))
-
-
- EOF
- }
}
print '(list';
for (@pkgs) {
diff --git a/src/org/euandre/packages.scm b/src/org/euandre/packages.scm
index a7b0d4e..19b9b23 100644
--- a/src/org/euandre/packages.scm
+++ b/src/org/euandre/packages.scm
@@ -93,9 +93,9 @@ re-arrange the input according to common picks.")
(home-page "https://euandre.org/s/remembering/")
(license licenses:agpl3+)))
-(define-public td-latest
+(define-public td
(package
- (name "td-latest")
+ (name "td")
(version "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8")
(source
(origin
@@ -123,15 +123,9 @@ file in the repository.")
(home-page "https://euandre.org/s/td/")
(license licenses:agpl3+)))
-(define-public td
- (package
- (inherit td-latest)
- (name "td")))
-
-
-(define-public guile-heredoc-latest
+(define-public guile-heredoc
(package
- (name "guile-heredoc-latest")
+ (name "guile-heredoc")
(version "065435cdce609604e33b879b9be3e81ab89f3e7b")
(source
(origin
@@ -158,17 +152,9 @@ file in the repository.")
(home-page "https://euandre.org/s/guile-heredoc/")
(license licenses:agpl3+)))
-(define-public guile-heredoc
- (package
- (inherit guile-heredoc-latest)
- (name "guile-heredoc")))
-
-
(list
git-permalink-0-1-0
git-permalink-0-2-0
remembering-0-1-2
td
- td-latest
- guile-heredoc
- guile-heredoc-latest)
+ guile-heredoc)