Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 281e3a3c2360
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ac6599895725
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jan 17, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ac65998 View commit details
Showing with 42 additions and 6 deletions.
  1. +14 −6 pkgs/development/tools/wabt/default.nix
  2. +28 −0 pkgs/development/tools/wabt/version.patch
20 changes: 14 additions & 6 deletions pkgs/development/tools/wabt/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{ stdenv, fetchFromGitHub, cmake, python3 }:
{ stdenv, fetchFromGitHub, cmake, python3, substituteAll }:

stdenv.mkDerivation rec {
pname = "wabt";
version = "1.0.12";
version = "1.0.13";

src = fetchFromGitHub {
owner = "WebAssembly";
repo = "wabt";
rev = version;
sha256 = "1zlv3740wkqj4mn6sr84h0x6wk2lcp4pwwmqsh5yyqp1j1glbsa0";
owner = "WebAssembly";
repo = "wabt";
rev = version;
sha256 = "07x8m5sf4c7zjq1flypycw1d15ylqdp38l81vn961ds089ngvpgg";
fetchSubmodules = true;
};

patches = [
(substituteAll {
src = ./version.patch;
inherit version;
})
];

nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_TESTS=OFF" ];
buildInputs = [ python3 ];
28 changes: 28 additions & 0 deletions pkgs/development/tools/wabt/version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 363a5660..ad3300ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,22 +68,7 @@ endif ()
include(CheckTypeSize)
check_type_size(ssize_t SSIZE_T)
check_type_size(size_t SIZEOF_SIZE_T)
-
-FIND_PACKAGE(Git QUIET REQUIRED)
-EXECUTE_PROCESS(COMMAND
- "${GIT_EXECUTABLE}" --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git describe --tags
- RESULT_VARIABLE
- GIT_HASH_RESULT
- OUTPUT_VARIABLE
- GIT_HASH
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-IF(${GIT_HASH_RESULT} EQUAL 0)
- SET(WABT_VERSION_INFO "${GIT_HASH}")
-ELSE()
- MESSAGE(WARNING "Error running git describe to determine version")
- SET(WABT_VERSION_INFO "(unable to determine version)")
-ENDIF()
+SET(WABT_VERSION_INFO "@version@")

configure_file(
${WABT_SOURCE_DIR}/src/config.h.in