push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
diff --git a/psst-core/build.rs b/psst-core/build.rs
deleted file mode 100644
index 4e899af..0000000
--- a/psst-core/build.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-use gix_config::File;
-use std::{env, fs, io::Write};
-use time::OffsetDateTime;
-
-fn main() {
- let outdir = env::var("OUT_DIR").unwrap();
- let outfile = format!("{}/build-time.txt", outdir);
-
- let mut fh = fs::File::create(outfile).unwrap();
- let now = OffsetDateTime::now_local().unwrap_or_else(|_| OffsetDateTime::now_utc());
- write!(fh, r#""{}""#, now).ok();
-
- let git_config = File::from_git_dir("../.git/".into()).expect("Git Config not found!");
- // Get Git's 'Origin' URL
- let mut remote_url = git_config
- .raw_value("remote.origin.url")
- .expect("Couldn't extract origin url!")
- .to_string();
-
- // Check whether origin is accessed via ssh
- if remote_url.contains('@') {
- // If yes, strip the `git@` prefix and split the domain and path
- let mut split = remote_url
- .strip_prefix("git@")
- .unwrap_or(&remote_url)
- .split(':');
- let domain = split
- .next()
- .expect("Couldn't extract domain from ssh-style origin");
- let path = split
- .next()
- .expect("Couldn't expect path from ssh-style origin");
-
- // And construct the http-style url
- remote_url = format!("https://{domain}/{path}");
- }
- let trimmed_url = remote_url.trim_end_matches(".git");
- remote_url.clone_from(&String::from(trimmed_url));
-
- let outfile = format!("{}/remote-url.txt", outdir);
- let mut file = fs::File::create(outfile).unwrap();
- write!(file, r#""{}""#, remote_url).ok();
-}
diff --git a/psst-core/src/lib.rs b/psst-core/src/lib.rs
index 2faa317..b890a2d 100644
--- a/psst-core/src/lib.rs
+++ b/psst-core/src/lib.rs
@@ -2,9 +2,9 @@
use git_version::git_version;
-pub const GIT_VERSION: &str = git_version!();
-pub const BUILD_TIME: &str = include!(concat!(env!("OUT_DIR"), "/build-time.txt"));
-pub const REMOTE_URL: &str = include!(concat!(env!("OUT_DIR"), "/remote-url.txt"));
+pub const GIT_VERSION: &str = "";
+pub const BUILD_TIME: &str = "1970-01-01 00:00:00";
+pub const REMOTE_URL: &str = "https://github.com/jpochyla/psst";
pub mod actor;
pub mod audio;

View File

@@ -0,0 +1,92 @@
{
alsa-lib,
atk,
cairo,
dbus,
fetchFromGitHub,
gdk-pixbuf,
glib,
gtk3,
lib,
libclang,
makeDesktopItem,
nix-update-script,
pango,
pkg-config,
rustPlatform,
stdenv,
}:
let
desktopItem = makeDesktopItem {
categories = [
"Audio"
"AudioVideo"
];
comment = "Spotify client with native GUI written in Rust, without Electron";
desktopName = "Psst";
exec = "psst-gui %U";
icon = "psst";
name = "Psst";
startupWMClass = "psst-gui";
};
in
rustPlatform.buildRustPackage {
pname = "psst";
version = "0-unstable-2025-04-20";
src = fetchFromGitHub {
owner = "jpochyla";
repo = "psst";
rev = "86169f8b05c1b3502261cfe1fae9af2487b8f1bb";
hash = "sha256-BkGoaYflCTiElTj47r2j/ngUrZ9wIe0q4pl+zhoattA=";
};
cargoHash = "sha256-gt2EDrZ+XXig5JUsmQksSLaFd7UArnttOT4UiTVASXw=";
# specify the subdirectory of the binary crate to build from the workspace
buildAndTestSubdir = "psst-gui";
env = {
LIBCLANG_PATH = "${lib.getLib libclang}/lib";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
atk
cairo
gdk-pixbuf
glib
gtk3
pango
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
dbus
];
patches = [
# Use a fixed build time, hard-code upstream URL instead of trying to read `.git`
./make-build-reproducible.patch
];
postInstall = ''
install -Dm644 psst-gui/assets/logo_512.png -t $out/share/icons/hicolor/512x512/apps/psst.png
install -Dm644 ${desktopItem}/share/applications/* -t $out/share/applications
'';
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
meta = {
description = "Spotify client with native GUI written in Rust, without Electron";
homepage = "https://github.com/jpochyla/psst";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
vbrandl
peterhoeg
];
mainProgram = "psst-gui";
};
}