Skip to content

Instantly share code, notes, and snippets.

@tebriel

tebriel/.envrc Secret

Last active June 27, 2023 18:30
Show Gist options
  • Save tebriel/632c6e6ec7312ddb0d3add404e605755 to your computer and use it in GitHub Desktop.
Save tebriel/632c6e6ec7312ddb0d3add404e605755 to your computer and use it in GitHub Desktop.
Simple Example of Devenv Issue
source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0="
use devenv
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1687877315,
"narHash": "sha256-PUzilA1dUdO+aQO1urBrjlmCbtEAJUmHg7k1P4o9tdE=",
"owner": "cachix",
"repo": "devenv",
"rev": "36e0f2a9e3ba7b4e0cd77128c4b3551641dacd63",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1687793116,
"narHash": "sha256-6xRgZ2E9r/BNam87vMkHJ/0EPTTKzeNwhw3abKilEE4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9e4e0807d2142d17f463b26a8b796b3fe20a3011",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1687779420,
"narHash": "sha256-noueZE/Z5qx6NF/grg46qlpZ/1nuPpc92RvqgCmRaLI=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "1fa438eee82f35bdd4bc30a9aacd7648d757b388",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
},
"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
}
{ pkgs, ... }:
{
# https://devenv.sh/languages/
languages.ruby.enable = true;
}
current directory: /Users/tebriel/work/src/github.com/tebriel/devenv-em-bug/.devenv/state/.bundle/ruby/3.1.0/gems/eventmachine-1.2.7/ext
/nix/store/98wwdkbmqsygk1rpkfyd99dn9rcja34w-ruby-3.1.4/bin/ruby extconf.rb
checking for -lcrypto... no
checking for openssl/ssl.h... no
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for pipe2() in unistd.h... no
checking for accept4() in sys/socket.h... no
checking for SOCK_CLOEXEC in sys/socket.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... yes
checking for CLOCK_MONOTONIC_RAW in time.h... yes
checking for CLOCK_MONOTONIC in time.h... yes
CXXFLAGS=-fdeclspec
creating Makefile
current directory: /Users/tebriel/work/src/github.com/tebriel/devenv-em-bug/.devenv/state/.bundle/ruby/3.1.0/gems/eventmachine-1.2.7/ext
make DESTDIR\= sitearchdir\=./.gem.20230627-45881-50zbq6 sitelibdir\=./.gem.20230627-45881-50zbq6 clean
current directory: /Users/tebriel/work/src/github.com/tebriel/devenv-em-bug/.devenv/state/.bundle/ruby/3.1.0/gems/eventmachine-1.2.7/ext
make DESTDIR\= sitearchdir\=./.gem.20230627-45881-50zbq6 sitelibdir\=./.gem.20230627-45881-50zbq6
compiling binder.cpp
compiling cmain.cpp
compiling ed.cpp
compiling em.cpp
compiling kb.cpp
compiling page.cpp
compiling pipe.cpp
compiling rubymain.cpp
rubymain.cpp:220:3: warning: 'rb_rescue' is deprecated: Use of ANYARGS in this function is deprecated [-Wdeprecated-declarations]
rb_rescue((VALUE (*)(ANYARGS))event_callback, (VALUE)&e, (VALUE (*)(ANYARGS))event_error_handler, Qnil);
^
/nix/store/98wwdkbmqsygk1rpkfyd99dn9rcja34w-ruby-3.1.4/include/ruby-3.1.0/ruby/backward/cxxanyargs.hpp:246:1: note: 'rb_rescue' has been explicitly marked deprecated here
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
^
/nix/store/98wwdkbmqsygk1rpkfyd99dn9rcja34w-ruby-3.1.4/include/ruby-3.1.0/ruby/backward/2/attributes.h:78:35: note: expanded from macro 'RUBY_CXX_DEPRECATED'
#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
^
/nix/store/98wwdkbmqsygk1rpkfyd99dn9rcja34w-ruby-3.1.4/include/ruby-3.1.0/ruby/internal/attr/deprecated.h:36:53: note: expanded from macro 'RBIMPL_ATTR_DEPRECATED'
# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
^
1 warning generated.
compiling ssl.cpp
linking shared-object rubyeventmachine.bundle
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-clang-wrapper-11.1.0/resource-root/lib'
ld: library not found for -lc++abi
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:264: rubyeventmachine.bundle] Error 1
make failed, exit code 2
require 'rbconfig'
puts RbConfig::MAKEFILE_CONFIG["LDFLAGS"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment