build success

This commit is contained in:
Bit Borealis 2023-07-26 09:15:44 +00:00
commit 0b92edfa0c
Signed by: theotheroracle
GPG key ID: 2D816A2DCA6E5649
5 changed files with 154 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
result
*.nix.old

65
default.nix Normal file
View file

@ -0,0 +1,65 @@
{ stdenv
, pkg-config
, lib
, qtbase
, qtquickcontrols2
, qtdeclarative
, qtmultimedia
, qttools
, cmake
, fmt_9
, tor
, openssl
, protobuf
, wrapQtAppsHook
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "ricochet-refresh";
version = "3.0.16-release";
src = fetchFromGitHub {
owner = "blueprint-freespeech";
repo = "ricochet-refresh";
rev = "v${version}";
sha256 = "sha256-Jh5KD+XXL7Zbu/G84Z8z4hvBP0xEsOq/G9IutoUrCMI=";
};
buildInputs = [
fmt_9
openssl
qtquickcontrols2
qtmultimedia
protobuf
# qtdeclarative
qttools
qtbase
];
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
cmakeFlags = [
"-S ../src"
# "-B ../build"
"-DCMAKE_BUILD_TYPE=MinSizeRel"
"-DRICOCHET_REFRESH_INSTALL_DESKTOP=ON"
"-DUSE_SUBMODULE_FMT=OFF"
"-DFORCE_QT5=ON"
# "--debug-find-pkg=Qt6MultimediaQuick"
# "-DQT_DEBUG_FIND_PACKAGE=ON"
];
postUnpack = ''
TOR_SRC=$(tar --list --file ${tor.src} --occurrence --wildcards '*')
TOR_DIR=source/src/extern/tor
tar -xf ${tor.src}
rm -d $TOR_DIR
mv $TOR_SRC $TOR_DIR
'';
preConfigure = ''
export CMAKE_GENERATOR="Unix Makefiles"
export FORCE_QT5=true
'';
}

58
flake.lock Normal file
View file

@ -0,0 +1,58 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1690235791,
"narHash": "sha256-QkPVQ859F0wXyd74A7UPYbmi4B5xYN4Ns7AQ0pvM0Wo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dfcffbd74fd6f0419370d8240e445252a39f4d10",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

10
flake.nix Normal file
View file

@ -0,0 +1,10 @@
{
description = "Ricochet";
outputs = { self, nixpkgs, flake-utils }:
let pkgs = nixpkgs.legacyPackages.x86_64-linux; in
{
packages.x86_64-linux.default = pkgs.libsForQt5.callPackage ./default.nix {};
devShells.default = import ./shell.nix { inherit pkgs; };
};
}

19
shell.nix Normal file
View file

@ -0,0 +1,19 @@
# shell.nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
cmake
fmt_9
tor
openssl
protobuf
pkgconfig
] ++ ( with pkgs.libsForQt5; [
qtbase
qtquickcontrols2
qtmultimedia
qtdeclarative
qttools
]);
}