-
Notifications
You must be signed in to change notification settings - Fork 1
/
pkg.nix
29 lines (26 loc) · 838 Bytes
/
pkg.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ flatpak-pkg, pkgs, lib }:
let
rustPkg = pkgs.rustPlatform.buildRustPackage rec {
pname = "nixpak-flatpak-wrapper";
version = "0.1.0";
src = lib.cleanSource ./.;
buildInputs = [ pkgs.makeWrapper ];
cargoBuildFlags = [ ];
cargoLock.lockFile = ./Cargo.lock;
meta = {
description = "A wrapper for flatpak to make xdg-portal service compatible with nixpak";
homepage = "https://github.com/crabdancing/nixpak-flatpak-wrapper";
license = pkgs.lib.licenses.lgpl3Only;
};
};
in
(pkgs.symlinkJoin {
name = "flatpak";
meta.mainProgram = "flatpak";
paths = [ flatpak-pkg rustPkg ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
mv "$out/bin/flatpak" "$out/bin/flatpak-raw"
ln -s "$out/bin/nixpak-flatpak-wrapper" "$out/bin/flatpak"
'';
})