Skip to content

Commit

Permalink
Added surfer waveviewer package
Browse files Browse the repository at this point in the history
  • Loading branch information
HU90m committed Apr 5, 2024
1 parent ad2aa6c commit 5c53fa1
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";

poetry2nix = {
Expand All @@ -23,6 +24,7 @@
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
flake-utils,
...
} @ inputs: let
Expand All @@ -37,7 +39,10 @@
pkgs = import nixpkgs {
inherit system;
};
lowrisc_pkgs = import ./pkgs {inherit pkgs inputs;};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
};
lowrisc_pkgs = import ./pkgs {inherit pkgs pkgs-unstable inputs;};
in {
checks = {
license = pkgs.stdenv.mkDerivation {
Expand Down
2 changes: 2 additions & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: MIT
{
pkgs,
pkgs-unstable,
inputs,
...
}:
Expand All @@ -22,6 +23,7 @@
cheriot-sim = pkgs.callPackage ./cheriot-sim.nix {};

container-hotplug = pkgs.callPackage ./container-hotplug {};
surfer = pkgs-unstable.callPackage ./surfer.nix {};
}
// pkgs.lib.optionalAttrs (pkgs.system == "x86_64-linux") {
lowrisc-toolchain-gcc-rv32imcb = pkgs.callPackage ./lowrisc-toolchain-gcc-rv32imcb.nix {};
Expand Down
46 changes: 46 additions & 0 deletions pkgs/surfer.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
lib,
fetchFromGitLab,
rustPlatform,
pkg-config,
openssl,
wayland,
libxkbcommon,
libGL,
}:
rustPlatform.buildRustPackage rec {
pname = "surfer";
version = "0.2.0-dev";

src = fetchFromGitLab {
owner = "surfer-project";
repo = pname;
rev = "01c2486f65e248baccf666e2ee4dd9b4e219cc21";
hash = "sha256-MJ7tBnqZlmnNIIqDFPj9numeztMUfcrDTbRMF6okOVk=";
fetchSubmodules = true;
};

nativeBuildInputs = [pkg-config];
buildInputs = [openssl wayland libxkbcommon libGL];

# Trying to get nix run to work, this didn't work.
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";

cargoLock = {
lockFile = "${src}/Cargo.lock";
outputHashes = {
"codespan-0.12.0" = "sha256-3F2006BR3hyhxcUTaQiOjzTEuRECKJKjIDyXonS/lrE=";
"egui_skia-0.5.0" = "sha256-dpkcIMPW+v742Ov18vjycLDwnn1JMsvbX6qdnuKOBC4=";
"tracing-tree-0.2.0" = "sha256-/JNeAKjAXmKPh0et8958yS7joORDbid9dhFB0VUAhZc=";
};
};

doCheck = false;

meta = {
description = "An Extensible and Snappy Waveform Viewer";
homepage = "http://surfer-project.org/";
license = lib.licenses.eupl12;
maintainers = [];
};
}

0 comments on commit 5c53fa1

Please sign in to comment.